mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
Fix some visibility issues that were causing warnings
This commit is contained in:
parent
553ffd928b
commit
9cc5806f07
5 changed files with 12 additions and 8 deletions
|
@ -12,11 +12,11 @@ use crate::core::types::File;
|
|||
/// It is guaranteed that the link will be valid for at least 1 hour.
|
||||
/// When the link expires, a new one can be requested by calling getFile again.
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
struct GetFile<'a> {
|
||||
pub struct GetFile<'a> {
|
||||
#[serde(skip_serializing)]
|
||||
ctx: RequestContext<'a>,
|
||||
/// File identifier to get info about
|
||||
file_id: String,
|
||||
pub file_id: String,
|
||||
}
|
||||
|
||||
impl<'a> Request<'a> for GetFile<'a> {
|
||||
|
@ -36,6 +36,10 @@ impl<'a> Request<'a> for GetFile<'a> {
|
|||
}
|
||||
|
||||
impl<'a> GetFile<'a> {
|
||||
pub(crate) fn new(ctx: RequestContext<'a>, file_id: String) -> Self {
|
||||
Self { ctx, file_id }
|
||||
}
|
||||
|
||||
pub fn file_id<T>(mut self, file_id: T) -> Self
|
||||
where
|
||||
T: Into<String>,
|
||||
|
|
|
@ -8,7 +8,7 @@ use crate::core::requests::{
|
|||
/// arrives from your bot, Telegram clients clear its typing status).
|
||||
/// Returns True on success.
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
struct SendChatAction<'a> {
|
||||
pub struct SendChatAction<'a> {
|
||||
#[serde(skip_serializing)]
|
||||
ctx: RequestContext<'a>,
|
||||
/// Unique identifier for the target chat or
|
||||
|
@ -24,7 +24,7 @@ struct SendChatAction<'a> {
|
|||
|
||||
#[derive(Debug, Serialize, From, Clone)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
enum ChatAction {
|
||||
pub enum ChatAction {
|
||||
Typing,
|
||||
UploadPhoto,
|
||||
RecordVideo,
|
||||
|
|
|
@ -7,7 +7,7 @@ use crate::core::types::{Message, ReplyMarkup};
|
|||
/// Use this method to send phone contacts.
|
||||
/// returned.
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
struct SendContact<'a> {
|
||||
pub struct SendContact<'a> {
|
||||
#[serde(skip_serializing)]
|
||||
ctx: RequestContext<'a>,
|
||||
/// Unique identifier for the target chat or
|
||||
|
|
|
@ -7,7 +7,7 @@ use crate::core::types::{Message, ReplyMarkup};
|
|||
/// Use this method to send a native poll. A native poll can't be sent to a
|
||||
/// private chat. On success, the sent Message is returned.
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
struct SendPoll<'a> {
|
||||
pub struct SendPoll<'a> {
|
||||
#[serde(skip_serializing)]
|
||||
ctx: RequestContext<'a>,
|
||||
/// identifier for the target chat or username of the target channel (in
|
||||
|
|
|
@ -7,7 +7,7 @@ use crate::core::types::{Message, ReplyMarkup};
|
|||
/// Use this method to send information about a venue.
|
||||
/// Message is returned.
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
struct SendVenue<'a> {
|
||||
pub struct SendVenue<'a> {
|
||||
#[serde(skip_serializing)]
|
||||
ctx: RequestContext<'a>,
|
||||
/// Unique identifier for the target chat or
|
||||
|
@ -62,7 +62,7 @@ impl<'a> Request<'a> for SendVenue<'a> {
|
|||
}
|
||||
|
||||
impl<'a> SendVenue<'a> {
|
||||
pub fn new(
|
||||
pub(crate) fn new(
|
||||
ctx: RequestContext<'a>,
|
||||
chat_id: ChatId,
|
||||
latitude: f64,
|
||||
|
|
Loading…
Reference in a new issue