Improve documentation of file_size fields

This commit is contained in:
Maybe Waffle 2022-06-13 22:23:51 +04:00
parent 2de428e8eb
commit e788dc109f
10 changed files with 11 additions and 11 deletions

View file

@ -37,7 +37,7 @@ pub struct Animation {
#[serde(with = "crate::types::non_telegram_types::mime::opt_deser")]
pub mime_type: Option<Mime>,
/// A size of a file.
/// File size in bytes.
pub file_size: Option<u32>,
}

View file

@ -34,7 +34,7 @@ pub struct Audio {
#[serde(with = "crate::types::non_telegram_types::mime::opt_deser")]
pub mime_type: Option<Mime>,
/// A size of a file.
/// File size in bytes.
pub file_size: Option<u32>,
/// A thumbnail of the album cover to which the music file belongs.

View file

@ -32,6 +32,6 @@ pub struct Document {
#[serde(default, with = "crate::types::non_telegram_types::mime::opt_deser")]
pub mime_type: Option<Mime>,
/// A size of a file.
/// File size in bytes.
pub file_size: Option<u32>,
}

View file

@ -21,7 +21,7 @@ pub struct File {
/// file.
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
/// errourneusly marked as required in Teloxide. To workaround this issue,

View file

@ -17,8 +17,8 @@ pub struct PassportFile {
/// file.
pub file_unique_id: String,
/// File size.
pub file_size: u64,
/// File size in bytes.
pub file_size: u64, // FIXME: should be u32
/// Time when the file was uploaded.
#[serde(with = "crate::types::serde_date_from_unix_timestamp")]

View file

@ -21,7 +21,7 @@ pub struct PhotoSize {
/// Photo height.
pub height: u32,
/// File size.
/// File size in bytes.
pub file_size: Option<u32>,
}

View file

@ -44,6 +44,6 @@ pub struct Sticker {
/// For mask stickers, the position where the mask should be placed.
pub mask_position: Option<MaskPosition>,
/// File size.
/// File size in bytes.
pub file_size: Option<u32>,
}

View file

@ -36,6 +36,6 @@ pub struct Video {
#[serde(with = "crate::types::non_telegram_types::mime::opt_deser")]
pub mime_type: Option<Mime>,
/// File size.
/// File size in bytes.
pub file_size: Option<u32>,
}

View file

@ -30,6 +30,6 @@ pub struct VideoNote {
/// Video thumbnail.
pub thumb: Option<PhotoSize>,
/// File size.
/// File size in bytes.
pub file_size: Option<u32>,
}

View file

@ -22,6 +22,6 @@ pub struct Voice {
#[serde(with = "crate::types::non_telegram_types::mime::opt_deser")]
pub mime_type: Option<Mime>,
/// File size.
/// File size in bytes.
pub file_size: Option<u64>,
}