mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-23 15:01:45 +01:00
Improve documentation of file_size
fields
This commit is contained in:
parent
2de428e8eb
commit
e788dc109f
10 changed files with 11 additions and 11 deletions
|
@ -37,7 +37,7 @@ pub struct Animation {
|
||||||
#[serde(with = "crate::types::non_telegram_types::mime::opt_deser")]
|
#[serde(with = "crate::types::non_telegram_types::mime::opt_deser")]
|
||||||
pub mime_type: Option<Mime>,
|
pub mime_type: Option<Mime>,
|
||||||
|
|
||||||
/// A size of a file.
|
/// File size in bytes.
|
||||||
pub file_size: Option<u32>,
|
pub file_size: Option<u32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ pub struct Audio {
|
||||||
#[serde(with = "crate::types::non_telegram_types::mime::opt_deser")]
|
#[serde(with = "crate::types::non_telegram_types::mime::opt_deser")]
|
||||||
pub mime_type: Option<Mime>,
|
pub mime_type: Option<Mime>,
|
||||||
|
|
||||||
/// A size of a file.
|
/// File size in bytes.
|
||||||
pub file_size: Option<u32>,
|
pub file_size: Option<u32>,
|
||||||
|
|
||||||
/// A thumbnail of the album cover to which the music file belongs.
|
/// A thumbnail of the album cover to which the music file belongs.
|
||||||
|
|
|
@ -32,6 +32,6 @@ pub struct Document {
|
||||||
#[serde(default, with = "crate::types::non_telegram_types::mime::opt_deser")]
|
#[serde(default, with = "crate::types::non_telegram_types::mime::opt_deser")]
|
||||||
pub mime_type: Option<Mime>,
|
pub mime_type: Option<Mime>,
|
||||||
|
|
||||||
/// A size of a file.
|
/// File size in bytes.
|
||||||
pub file_size: Option<u32>,
|
pub file_size: Option<u32>,
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ pub struct File {
|
||||||
/// file.
|
/// file.
|
||||||
pub file_unique_id: String,
|
pub file_unique_id: String,
|
||||||
|
|
||||||
/// File size, if known.
|
/// File size in bytes, if known.
|
||||||
///
|
///
|
||||||
/// **Note:** in the Telegram Bot API this field is optional, however it was
|
/// **Note:** in the Telegram Bot API this field is optional, however it was
|
||||||
/// errourneusly marked as required in Teloxide. To workaround this issue,
|
/// errourneusly marked as required in Teloxide. To workaround this issue,
|
||||||
|
|
|
@ -17,8 +17,8 @@ pub struct PassportFile {
|
||||||
/// file.
|
/// file.
|
||||||
pub file_unique_id: String,
|
pub file_unique_id: String,
|
||||||
|
|
||||||
/// File size.
|
/// File size in bytes.
|
||||||
pub file_size: u64,
|
pub file_size: u64, // FIXME: should be u32
|
||||||
|
|
||||||
/// Time when the file was uploaded.
|
/// Time when the file was uploaded.
|
||||||
#[serde(with = "crate::types::serde_date_from_unix_timestamp")]
|
#[serde(with = "crate::types::serde_date_from_unix_timestamp")]
|
||||||
|
|
|
@ -21,7 +21,7 @@ pub struct PhotoSize {
|
||||||
/// Photo height.
|
/// Photo height.
|
||||||
pub height: u32,
|
pub height: u32,
|
||||||
|
|
||||||
/// File size.
|
/// File size in bytes.
|
||||||
pub file_size: Option<u32>,
|
pub file_size: Option<u32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,6 @@ pub struct Sticker {
|
||||||
/// For mask stickers, the position where the mask should be placed.
|
/// For mask stickers, the position where the mask should be placed.
|
||||||
pub mask_position: Option<MaskPosition>,
|
pub mask_position: Option<MaskPosition>,
|
||||||
|
|
||||||
/// File size.
|
/// File size in bytes.
|
||||||
pub file_size: Option<u32>,
|
pub file_size: Option<u32>,
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,6 @@ pub struct Video {
|
||||||
#[serde(with = "crate::types::non_telegram_types::mime::opt_deser")]
|
#[serde(with = "crate::types::non_telegram_types::mime::opt_deser")]
|
||||||
pub mime_type: Option<Mime>,
|
pub mime_type: Option<Mime>,
|
||||||
|
|
||||||
/// File size.
|
/// File size in bytes.
|
||||||
pub file_size: Option<u32>,
|
pub file_size: Option<u32>,
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,6 @@ pub struct VideoNote {
|
||||||
/// Video thumbnail.
|
/// Video thumbnail.
|
||||||
pub thumb: Option<PhotoSize>,
|
pub thumb: Option<PhotoSize>,
|
||||||
|
|
||||||
/// File size.
|
/// File size in bytes.
|
||||||
pub file_size: Option<u32>,
|
pub file_size: Option<u32>,
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,6 @@ pub struct Voice {
|
||||||
#[serde(with = "crate::types::non_telegram_types::mime::opt_deser")]
|
#[serde(with = "crate::types::non_telegram_types::mime::opt_deser")]
|
||||||
pub mime_type: Option<Mime>,
|
pub mime_type: Option<Mime>,
|
||||||
|
|
||||||
/// File size.
|
/// File size in bytes.
|
||||||
pub file_size: Option<u64>,
|
pub file_size: Option<u64>,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue