pub struct Session { /* private fields */ }
Expand description
Contains information about one session in a Telegram application used by the current user. Sessions must be shown to the user in the returned order
Implementations§
Source§impl Session
impl Session
pub fn from_json<S: AsRef<str>>(json: S) -> Result<Self>
pub fn builder() -> SessionBuilder
pub fn id(&self) -> i64
pub fn is_current(&self) -> bool
pub fn is_password_pending(&self) -> bool
pub fn can_accept_secret_chats(&self) -> bool
pub fn can_accept_calls(&self) -> bool
pub fn api_id(&self) -> i32
pub fn application_name(&self) -> &String
pub fn application_version(&self) -> &String
pub fn is_official_application(&self) -> bool
pub fn device_model(&self) -> &String
pub fn platform(&self) -> &String
pub fn system_version(&self) -> &String
pub fn log_in_date(&self) -> i32
pub fn last_active_date(&self) -> i32
pub fn ip(&self) -> &String
pub fn country(&self) -> &String
pub fn region(&self) -> &String
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Session
impl<'de> Deserialize<'de> for Session
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnwindSafe for Session
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