pub enum DecryptedMedia {
Empty,
Photo {
thumb: Vec<u8>,
thumb_w: i32,
thumb_h: i32,
w: i32,
h: i32,
size: i32,
key: Vec<u8>,
iv: Vec<u8>,
caption: String,
},
Document {
thumb: Vec<u8>,
thumb_w: i32,
thumb_h: i32,
mime_type: String,
size: i64,
key: Vec<u8>,
iv: Vec<u8>,
attributes: Vec<DocumentAttribute>,
caption: String,
},
GeoPoint {
lat: f64,
long: f64,
},
Contact {
phone_number: String,
first_name: String,
last_name: String,
user_id: i32,
},
Unknown {
ctor: u32,
},
}Expand description
Media payload of a decrypted message.
For Photo and Document, key and iv are the one-time AES-256-IGE key and
IV (32 bytes each, fully used by IGE) of the separately uploaded encrypted file.
Variants§
Empty
No media.
Photo
A photo.
Fields
Document
A generic document.
Fields
§
attributes: Vec<DocumentAttribute>Document attributes.
GeoPoint
A location.
Contact
A shared contact.
Fields
Unknown
A media type this crate does not know.
Trait Implementations§
Source§impl Clone for DecryptedMedia
impl Clone for DecryptedMedia
Auto Trait Implementations§
impl Forget for DecryptedMedia
impl Freeze for DecryptedMedia
impl RefUnwindSafe for DecryptedMedia
impl Send for DecryptedMedia
impl Sync for DecryptedMedia
impl Unpin for DecryptedMedia
impl UnsafeUnpin for DecryptedMedia
impl UnwindSafe for DecryptedMedia
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