pub struct NotificationsSettings {
session: WeakRef<Session>,
api: RefCell<Option<NotificationSettings>>,
account_enabled: Cell<bool>,
session_enabled: Cell<bool>,
global_setting: Cell<NotificationsGlobalSetting>,
keywords_list: StringList,
per_room_settings: RefCell<HashMap<OwnedRoomId, NotificationsRoomSetting>>,
abort_handle: RefCell<Option<AbortHandle>>,
}Fields§
§session: WeakRef<Session>The parent Session.
api: RefCell<Option<NotificationSettings>>The SDK notification settings API.
account_enabled: Cell<bool>Whether notifications are enabled for this Matrix account.
session_enabled: Cell<bool>Whether notifications are enabled for this session.
global_setting: Cell<NotificationsGlobalSetting>The global setting about which messages trigger notifications.
keywords_list: StringListThe list of keywords that trigger notifications.
per_room_settings: RefCell<HashMap<OwnedRoomId, NotificationsRoomSetting>>The map of room ID to per-room notification setting.
Any room not in this map uses the global setting.
abort_handle: RefCell<Option<AbortHandle>>Implementations§
Source§impl NotificationsSettings
impl NotificationsSettings
Sourcefn register_type()
fn register_type()
Registers the type only once.
Source§impl NotificationsSettings
impl NotificationsSettings
Sourcefn set_session(&self, session: Option<&Session>)
fn set_session(&self, session: Option<&Session>)
Set the parent Session.
Sourcefn set_session_enabled(&self, enabled: bool)
fn set_session_enabled(&self, enabled: bool)
Set whether notifications are enabled for this session.
Sourcepub(super) fn api(&self) -> Option<MatrixNotificationSettings>
pub(super) fn api(&self) -> Option<MatrixNotificationSettings>
The SDK notification settings API.
Sourcepub(super) fn set_account_enabled(&self, enabled: bool)
pub(super) fn set_account_enabled(&self, enabled: bool)
Set whether notifications are enabled for this session.
Sourcepub(super) fn set_global_setting(&self, setting: NotificationsGlobalSetting)
pub(super) fn set_global_setting(&self, setting: NotificationsGlobalSetting)
Set the global setting about which messages trigger notifications.
Sourcepub(super) async fn update_keywords_list(&self)
pub(super) async fn update_keywords_list(&self)
Update the local list of keywords with the remote one.
Sourcepub(super) async fn update_per_room_settings(&self)
pub(super) async fn update_per_room_settings(&self)
Update the local list of per-room settings with the remote one.
Trait Implementations§
Source§impl Debug for NotificationsSettings
impl Debug for NotificationsSettings
Source§impl Default for NotificationsSettings
impl Default for NotificationsSettings
Source§fn default() -> NotificationsSettings
fn default() -> NotificationsSettings
Source§impl DerivedObjectProperties for NotificationsSettings
impl DerivedObjectProperties for NotificationsSettings
Source§fn derived_properties() -> &'static [ParamSpec]
fn derived_properties() -> &'static [ParamSpec]
Source§fn derived_property(&self, id: usize, pspec: &ParamSpec) -> Value
fn derived_property(&self, id: usize, pspec: &ParamSpec) -> Value
ObjectImpl but auto-generated by the Properties macro
to allow handling more complex use-cases.Source§fn derived_set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
fn derived_set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
ObjectImpl but auto-generated by the Properties macro
to allow handling more complex use-cases.Source§impl ObjectImpl for NotificationsSettings
impl ObjectImpl for NotificationsSettings
Source§fn properties() -> &'static [ParamSpec]
fn properties() -> &'static [ParamSpec]
Source§fn set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
fn set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
Source§fn constructed(&self)
fn constructed(&self)
Source§fn notify(&self, pspec: &ParamSpec)
fn notify(&self, pspec: &ParamSpec)
self.notify("property").fn dispatch_properties_changed(&self, pspecs: &[ParamSpec])
Source§impl ObjectSubclass for NotificationsSettings
impl ObjectSubclass for NotificationsSettings
Source§type ParentType = Object
type ParentType = Object
Source§type Interfaces = ()
type Interfaces = ()
Source§type Class = ClassStruct<NotificationsSettings>
type Class = ClassStruct<NotificationsSettings>
Source§type Instance = InstanceStruct<NotificationsSettings>
type Instance = InstanceStruct<NotificationsSettings>
Source§type Type = NotificationsSettings
type Type = NotificationsSettings
wrapper!Source§const ALLOW_NAME_CONFLICT: bool = false
const ALLOW_NAME_CONFLICT: bool = false
Source§fn type_init(_type_: &mut InitializingType<Self>)
fn type_init(_type_: &mut InitializingType<Self>)
Source§fn class_init(_klass: &mut Self::Class)
fn class_init(_klass: &mut Self::Class)
Source§fn with_class(_klass: &Self::Class) -> Self
fn with_class(_klass: &Self::Class) -> Self
Source§fn instance_init(_obj: &InitializingObject<Self>)
fn instance_init(_obj: &InitializingObject<Self>)
Auto Trait Implementations§
impl !Freeze for NotificationsSettings
impl !RefUnwindSafe for NotificationsSettings
impl !Send for NotificationsSettings
impl !Sync for NotificationsSettings
impl Unpin for NotificationsSettings
impl UnsafeUnpin for NotificationsSettings
impl !UnwindSafe for NotificationsSettings
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> ObjectImplExt for Twhere
T: ObjectImpl,
impl<T> ObjectImplExt for Twhere
T: ObjectImpl,
Source§fn parent_constructed(&self)
fn parent_constructed(&self)
glib::Object::constructed().Source§fn parent_notify(&self, pspec: &ParamSpec)
fn parent_notify(&self, pspec: &ParamSpec)
glib::Object::notify().Source§fn parent_dispatch_properties_changed(&self, pspecs: &[ParamSpec])
fn parent_dispatch_properties_changed(&self, pspecs: &[ParamSpec])
glib::Object::dispatch_properties_changed().Source§fn signal_chain_from_overridden(
&self,
token: &SignalClassHandlerToken,
values: &[Value],
) -> Option<Value>
fn signal_chain_from_overridden( &self, token: &SignalClassHandlerToken, values: &[Value], ) -> Option<Value>
Source§impl<T> ObjectSubclassExt for Twhere
T: ObjectSubclass,
impl<T> ObjectSubclassExt for Twhere
T: ObjectSubclass,
Source§fn obj(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
fn obj(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
Source§fn from_obj(obj: &<T as ObjectSubclass>::Type) -> &T
fn from_obj(obj: &<T as ObjectSubclass>::Type) -> &T
Source§fn ref_counted(&self) -> ObjectImplRef<T>
fn ref_counted(&self) -> ObjectImplRef<T>
self.