[][src]Struct ruma_client::Session

pub struct Session {
    pub access_token: String,
    pub identification: Option<Identification>,
}

A user session, containing an access token and information about the associated user account.

Fields

access_token: String

The access token used for this session.

identification: Option<Identification>

Identification information for a user

Methods

impl Session[src]

pub fn new(access_token: String, user_id: UserId, device_id: String) -> Self[src]

Deprecated

Create a new user session from an access token and a user ID.

pub fn access_token(&self) -> &str[src]

Deprecated

Get the access token associated with this session.

pub fn user_id(&self) -> Option<&UserId>[src]

Deprecated

Get the ID of the user the session belongs to.

pub fn device_id(&self) -> Option<&str>[src]

Deprecated

Get ID of the device the session belongs to.

Trait Implementations

impl Clone for Session[src]

impl Debug for Session[src]

impl<'de> Deserialize<'de> for Session[src]

impl Eq for Session[src]

impl Hash for Session[src]

impl PartialEq<Session> for Session[src]

impl Serialize for Session[src]

impl StructuralEq for Session[src]

impl StructuralPartialEq for Session[src]

Auto Trait Implementations

impl RefUnwindSafe for Session

impl Send for Session

impl Sync for Session

impl Unpin for Session

impl UnwindSafe for Session

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.