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 has_display_name(&self) -> bool { ... }
fn set_avatar_url(&self, uri: Option<OwnedMxcUri>) { ... }
fn matrix_to_uri(&self) -> MatrixToUri { ... }
async fn load_profile(&self) -> Result<(), ()> { ... }
fn is_ignored(&self) -> bool { ... }
fn connect_is_ignored_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}Provided Methods§
Sourcefn is_own_user(&self) -> bool
fn is_own_user(&self) -> bool
Whether this user is the same as the session’s user.
Sourcefn has_display_name(&self) -> bool
fn has_display_name(&self) -> bool
Whether this user has a display name set.
If the display name is not set, the display-name property returns the
localpart of the user ID.
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) -> Result<(), ()>
async fn load_profile(&self) -> Result<(), ()>
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.