Struct carapax::types::PassportFile
source · pub struct PassportFile {
pub file_date: i64,
pub file_id: String,
pub file_size: i64,
pub file_unique_id: String,
}
Expand description
Represents a file uploaded to Telegram Passport.
Currently all Telegram Passport files are in JPEG format when decrypted and don’t exceed 10MB.
Fields§
§file_date: i64
A unix timestamp when a file was uploaded.
file_id: String
An identifier for a file, which can be used to download or reuse the file.
file_size: i64
A file size in bytes.
file_unique_id: String
A unique identifier for a file.
It is supposed to be the same over time and for different bots. Can’t be used to download or reuse a file.
Implementations§
source§impl PassportFile
impl PassportFile
sourcepub fn new<A, B>(
file_date: i64,
file_id: A,
file_size: i64,
file_unique_id: B
) -> PassportFile
pub fn new<A, B>( file_date: i64, file_id: A, file_size: i64, file_unique_id: B ) -> PassportFile
Creates a new PassportFile
.
§Arguments
file_date
- A unix time when a file was uploaded.file_id
- An identifier for a file.file_size
- A file size in bytes.file_unique_id
- A unique identifier for a file.
Trait Implementations§
source§impl Clone for PassportFile
impl Clone for PassportFile
source§fn clone(&self) -> PassportFile
fn clone(&self) -> PassportFile
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PassportFile
impl Debug for PassportFile
source§impl<'de> Deserialize<'de> for PassportFile
impl<'de> Deserialize<'de> for PassportFile
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<PassportFile, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<PassportFile, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for PassportFile
impl PartialEq for PassportFile
source§fn eq(&self, other: &PassportFile) -> bool
fn eq(&self, other: &PassportFile) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for PassportFile
impl PartialOrd for PassportFile
source§fn partial_cmp(&self, other: &PassportFile) -> Option<Ordering>
fn partial_cmp(&self, other: &PassportFile) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for PassportFile
impl Serialize for PassportFile
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 StructuralPartialEq for PassportFile
Auto Trait Implementations§
impl Freeze for PassportFile
impl RefUnwindSafe for PassportFile
impl Send for PassportFile
impl Sync for PassportFile
impl Unpin for PassportFile
impl UnwindSafe for PassportFile
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more