#[non_exhaustive]pub struct RoomPresenceSharingEventContent {
pub presence_sharing: PresenceSharingHint,
}Expand description
The content of an m.room.presence_sharing event.
The room’s presence sharing hint indicates either:
- Sharing presence within the room is prohibited (
forbid), or - Sharing presence within the room should be recommended by clients (
suggest)
This event uses the unstable prefix defined in MSC4495.
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.presence_sharing: PresenceSharingHintThe room’s presence sharing hint.
Implementations§
Source§impl RoomPresenceSharingEventContent
impl RoomPresenceSharingEventContent
Sourcepub fn new(hint: PresenceSharingHint) -> Self
pub fn new(hint: PresenceSharingHint) -> Self
Creates a new RoomPresenceSharingEventContent with the given hint.
Trait Implementations§
Source§impl Clone for RoomPresenceSharingEventContent
impl Clone for RoomPresenceSharingEventContent
Source§fn clone(&self) -> RoomPresenceSharingEventContent
fn clone(&self) -> RoomPresenceSharingEventContent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de> Deserialize<'de> for RoomPresenceSharingEventContent
impl<'de> Deserialize<'de> for RoomPresenceSharingEventContent
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 From<RoomPresenceSharingEventContent> for AnyStateEventContent
Available on crate feature unstable-msc4495 only.
impl From<RoomPresenceSharingEventContent> for AnyStateEventContent
Available on crate feature
unstable-msc4495 only.Source§fn from(c: RoomPresenceSharingEventContent) -> Self
fn from(c: RoomPresenceSharingEventContent) -> Self
Converts to this type from the input type.
Source§impl From<RoomPresenceSharingEventContent> for PossiblyRedactedRoomPresenceSharingEventContent
impl From<RoomPresenceSharingEventContent> for PossiblyRedactedRoomPresenceSharingEventContent
Source§fn from(
value: RoomPresenceSharingEventContent,
) -> PossiblyRedactedRoomPresenceSharingEventContent
fn from( value: RoomPresenceSharingEventContent, ) -> PossiblyRedactedRoomPresenceSharingEventContent
Converts to this type from the input type.
impl JsonCastable<AnyStateEventContent> for RoomPresenceSharingEventContent
Available on crate feature
unstable-msc4495 only.impl JsonCastable<Map<String, Value>> for RoomPresenceSharingEventContent
impl JsonCastable<PossiblyRedactedRoomPresenceSharingEventContent> for RoomPresenceSharingEventContent
impl JsonCastable<RedactedRoomPresenceSharingEventContent> for RoomPresenceSharingEventContent
Source§impl RedactContent for RoomPresenceSharingEventContent
impl RedactContent for RoomPresenceSharingEventContent
Source§type Redacted = RedactedRoomPresenceSharingEventContent
type Redacted = RedactedRoomPresenceSharingEventContent
The redacted form of the event’s content.
Source§fn redact(
self,
_rules: &RedactionRules,
) -> RedactedRoomPresenceSharingEventContent
fn redact( self, _rules: &RedactionRules, ) -> RedactedRoomPresenceSharingEventContent
Transform
self into a redacted form (removing most or all fields) according to the spec. Read moreSource§impl StateEventContent for RoomPresenceSharingEventContent
impl StateEventContent for RoomPresenceSharingEventContent
Source§type StateKey = EmptyStateKey
type StateKey = EmptyStateKey
The type of the event’s
state_key field.Source§fn event_type(&self) -> StateEventType
fn event_type(&self) -> StateEventType
Get the event’s type, like
m.room.name.Source§impl StaticStateEventContent for RoomPresenceSharingEventContent
impl StaticStateEventContent for RoomPresenceSharingEventContent
Source§type PossiblyRedacted = PossiblyRedactedRoomPresenceSharingEventContent
type PossiblyRedacted = PossiblyRedactedRoomPresenceSharingEventContent
The possibly redacted form of the event’s content.
Source§type Unsigned = StateUnsigned<<RoomPresenceSharingEventContent as StaticStateEventContent>::PossiblyRedacted>
type Unsigned = StateUnsigned<<RoomPresenceSharingEventContent as StaticStateEventContent>::PossiblyRedacted>
The type of the event’s
unsigned field.Auto Trait Implementations§
impl Freeze for RoomPresenceSharingEventContent
impl RefUnwindSafe for RoomPresenceSharingEventContent
impl Send for RoomPresenceSharingEventContent
impl Sync for RoomPresenceSharingEventContent
impl Unpin for RoomPresenceSharingEventContent
impl UnsafeUnpin for RoomPresenceSharingEventContent
impl UnwindSafe for RoomPresenceSharingEventContent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> EventContentFromType for Twhere
T: StaticEventContent + DeserializeOwned,
impl<T> EventContentFromType for Twhere
T: StaticEventContent + DeserializeOwned,
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<> Read more