Trait fractal::session::model::user::UserExt

source ·
pub trait UserExt: IsA<User> {
    // Provided methods
    fn session(&self) -> Session { ... }
    fn user_id(&self) -> &OwnedUserId { ... }
    fn is_own_user(&self) -> bool { ... }
    fn set_name(&self, name: Option<String>) { ... }
    fn set_avatar_url(&self, uri: Option<OwnedMxcUri>) { ... }
    fn matrix_to_uri(&self) -> MatrixToUri { ... }
    async fn load_profile(&self) { ... }
    fn is_ignored(&self) -> bool { ... }
    fn connect_is_ignored_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId { ... }
}

Provided Methods§

source

fn session(&self) -> Session

The current session.

source

fn user_id(&self) -> &OwnedUserId

The ID of this user.

source

fn is_own_user(&self) -> bool

Whether this user is the same as the session’s user.

source

fn set_name(&self, name: Option<String>)

Set the name of this user.

source

fn set_avatar_url(&self, uri: Option<OwnedMxcUri>)

Set the avatar URL of this user.

source

fn matrix_to_uri(&self) -> MatrixToUri

Get the matrix.to URI representation for this User.

source

async fn load_profile(&self)

Load the user profile from the homeserver.

This overwrites the already loaded display name and avatar.

source

fn is_ignored(&self) -> bool

Whether this user is currently ignored.

source

fn connect_is_ignored_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

Connect to the signal emitted when the is-ignored property changes.

Object Safety§

This trait is not object safe.

Implementors§