Skip to main content

Downloadable

Trait Downloadable 

Source
pub trait Downloadable {
    // Required method
    fn to_input_location(&self) -> Option<InputFileLocation>;

    // Provided method
    fn size(&self) -> Option<usize> { ... }
}
Expand description

Something that can be downloaded via Client::iter_download.

Implemented by Photo, Document, and Sticker.

Required Methods§

Source

fn to_input_location(&self) -> Option<InputFileLocation>

Return the InputFileLocation needed for upload.getFile.

Provided Methods§

Source

fn size(&self) -> Option<usize>

File size in bytes, if known (used to choose the concurrent path).

Implementors§