pub struct Account { /* private fields */ }Expand description
A Telegram account extracted from tdata
Implementations§
Source§impl Account
impl Account
Sourcepub fn user_id(&self) -> i64
pub fn user_id(&self) -> i64
Get the Telegram user ID.
Treat account identifiers as private data and avoid logging them.
Sourcepub fn auth_key_bytes(&self) -> &[u8; 256]
pub fn auth_key_bytes(&self) -> &[u8; 256]
Get the raw auth key bytes.
This grants access to the Telegram account. Never log, serialize, or expose it.
Sourcepub fn to_grammers_session_data(&self) -> SessionData
pub fn to_grammers_session_data(&self) -> SessionData
Convert to grammers SessionData.
The returned value contains live authentication credentials and can be imported
into any grammers session storage. Never log or expose it.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Account
impl RefUnwindSafe for Account
impl Send for Account
impl Sync for Account
impl Unpin for Account
impl UnsafeUnpin for Account
impl UnwindSafe for Account
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