pub struct GetFile {
pub file_id: String,
}
Expand description
Use this method to get basic info about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File
object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>
, where <file_path>
is taken from the response. 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.
Fields§
§file_id: String
File identifier to get info about
Implementations§
Trait Implementations§
source§impl PartialEq<GetFile> for GetFile
impl PartialEq<GetFile> for GetFile
source§impl Payload for GetFile
impl Payload for GetFile
source§fn timeout_hint(&self) -> Option<Duration>
fn timeout_hint(&self) -> Option<Duration>
If this payload may take long time to execute (e.g.
GetUpdates
with
big timeout
), the minimum timeout that should be used.source§impl Serialize for GetFile
impl Serialize for GetFile
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for GetFile
impl StructuralEq for GetFile
impl StructuralPartialEq for GetFile
Auto Trait Implementations§
impl RefUnwindSafe for GetFile
impl Send for GetFile
impl Sync for GetFile
impl Unpin for GetFile
impl UnwindSafe for GetFile
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Erasable for T
impl<T> Erasable for T
source§impl<P> GetFileSetters for Pwhere
P: HasPayload<Payload = GetFile>,
impl<P> GetFileSetters for Pwhere
P: HasPayload<Payload = GetFile>,
source§impl<P> HasPayload for Pwhere
P: Payload,
impl<P> HasPayload for Pwhere
P: Payload,
source§fn payload_mut(&mut self) -> &mut <P as HasPayload>::Payload
fn payload_mut(&mut self) -> &mut <P as HasPayload>::Payload
Gain mutable access to the underlying payload.
source§fn payload_ref(&self) -> &<P as HasPayload>::Payload
fn payload_ref(&self) -> &<P as HasPayload>::Payload
Gain immutable access to the underlying payload.