#[non_exhaustive]pub struct DoNotDisturbEventContent {
pub rooms: BTreeMap<DoNotDisturbRoomKey, DoNotDisturbRoom>,
}
Expand description
The content of a dm.filament.do_not_disturb
event.
A list of rooms in “Do not Disturb” mode.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.rooms: BTreeMap<DoNotDisturbRoomKey, DoNotDisturbRoom>
A map of rooms in which to inhibit notifications.
As DoNotDisturbRoom
is currently empty, only the room IDs are useful and
can be accessed with the .keys()
and into_keys()
iterators.
Implementations§
Source§impl DoNotDisturbEventContent
impl DoNotDisturbEventContent
Sourcepub fn new(rooms: BTreeMap<DoNotDisturbRoomKey, DoNotDisturbRoom>) -> Self
pub fn new(rooms: BTreeMap<DoNotDisturbRoomKey, DoNotDisturbRoom>) -> Self
Creates a new DoNotDisturbEventContent
from the given map of DoNotDisturbRoom
s.
Trait Implementations§
Source§impl Clone for DoNotDisturbEventContent
impl Clone for DoNotDisturbEventContent
Source§fn clone(&self) -> DoNotDisturbEventContent
fn clone(&self) -> DoNotDisturbEventContent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DoNotDisturbEventContent
impl Debug for DoNotDisturbEventContent
Source§impl Default for DoNotDisturbEventContent
impl Default for DoNotDisturbEventContent
Source§fn default() -> DoNotDisturbEventContent
fn default() -> DoNotDisturbEventContent
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DoNotDisturbEventContent
impl<'de> Deserialize<'de> for DoNotDisturbEventContent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Extend<DoNotDisturbRoomKey> for DoNotDisturbEventContent
impl Extend<DoNotDisturbRoomKey> for DoNotDisturbEventContent
Source§fn extend<T: IntoIterator<Item = DoNotDisturbRoomKey>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = DoNotDisturbRoomKey>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl Extend<OwnedRoomId> for DoNotDisturbEventContent
impl Extend<OwnedRoomId> for DoNotDisturbEventContent
Source§fn extend<T: IntoIterator<Item = OwnedRoomId>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = OwnedRoomId>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl From<DoNotDisturbEventContent> for AnyGlobalAccountDataEventContent
impl From<DoNotDisturbEventContent> for AnyGlobalAccountDataEventContent
Source§fn from(c: DoNotDisturbEventContent) -> Self
fn from(c: DoNotDisturbEventContent) -> Self
Converts to this type from the input type.
Source§impl FromIterator<DoNotDisturbRoomKey> for DoNotDisturbEventContent
impl FromIterator<DoNotDisturbRoomKey> for DoNotDisturbEventContent
Source§fn from_iter<T: IntoIterator<Item = DoNotDisturbRoomKey>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = DoNotDisturbRoomKey>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl FromIterator<OwnedRoomId> for DoNotDisturbEventContent
impl FromIterator<OwnedRoomId> for DoNotDisturbEventContent
Source§fn from_iter<T: IntoIterator<Item = OwnedRoomId>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = OwnedRoomId>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl GlobalAccountDataEventContent for DoNotDisturbEventContent
impl GlobalAccountDataEventContent for DoNotDisturbEventContent
Source§fn event_type(&self) -> GlobalAccountDataEventType
fn event_type(&self) -> GlobalAccountDataEventType
Get the event’s type, like
m.push_rules
.Source§impl Serialize for DoNotDisturbEventContent
impl Serialize for DoNotDisturbEventContent
impl JsonCastable<AnyGlobalAccountDataEventContent> for DoNotDisturbEventContent
impl JsonCastable<Map<String, Value>> for DoNotDisturbEventContent
Auto Trait Implementations§
impl Freeze for DoNotDisturbEventContent
impl RefUnwindSafe for DoNotDisturbEventContent
impl Send for DoNotDisturbEventContent
impl Sync for DoNotDisturbEventContent
impl Unpin for DoNotDisturbEventContent
impl UnwindSafe for DoNotDisturbEventContent
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
Mutably borrows from an owned value. Read more