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§
Sourcefn user_id(&self) -> &OwnedUserId
fn user_id(&self) -> &OwnedUserId
The ID of this user.
Sourcefn is_own_user(&self) -> bool
fn is_own_user(&self) -> bool
Whether this user is the same as the session’s user.
Sourcefn set_avatar_url(&self, uri: Option<OwnedMxcUri>)
fn set_avatar_url(&self, uri: Option<OwnedMxcUri>)
Set the avatar URL of this user.
Sourcefn matrix_to_uri(&self) -> MatrixToUri
fn matrix_to_uri(&self) -> MatrixToUri
Get the matrix.to
URI representation for this User
.
Sourceasync fn load_profile(&self)
async fn load_profile(&self)
Load the user profile from the homeserver.
This overwrites the already loaded display name and avatar.
Sourcefn is_ignored(&self) -> bool
fn is_ignored(&self) -> bool
Whether this user is currently ignored.
Sourcefn connect_is_ignored_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_is_ignored_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
Connect to the signal emitted when the is-ignored
property changes.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.