Skip to main content

SessionInfoExt

Trait SessionInfoExt 

Source
pub trait SessionInfoExt: 'static {
    // Required methods
    fn info(&self) -> &StoredSession;
    fn avatar_data(&self) -> AvatarData;

    // Provided methods
    fn user_id(&self) -> &OwnedUserId { ... }
    fn homeserver(&self) -> &Url { ... }
    fn client_id(&self) -> Option<&ClientId> { ... }
    fn uses_oauth_api(&self) -> bool { ... }
    fn device_id(&self) -> &OwnedDeviceId { ... }
    fn session_id(&self) -> &str { ... }
}
Expand description

Public trait containing implemented methods for everything that derives from SessionInfo.

To override the behavior of these methods, override the corresponding method of SessionInfoImpl.

Required Methods§

Source

fn info(&self) -> &StoredSession

The Matrix session’s info.

Source

fn avatar_data(&self) -> AvatarData

The avatar data to represent this session.

Provided Methods§

Source

fn user_id(&self) -> &OwnedUserId

The Matrix session’s user ID.

Source

fn homeserver(&self) -> &Url

The Matrix session’s homeserver.

Source

fn client_id(&self) -> Option<&ClientId>

The OAuth 2.0 client ID, if any.

Source

fn uses_oauth_api(&self) -> bool

Whether this session uses the OAuth 2.0 API.

Source

fn device_id(&self) -> &OwnedDeviceId

The Matrix session’s device ID.

Source

fn session_id(&self) -> &str

The local session’s ID.

Implementors§