pub struct MinimalStateEvent<C: PossiblyRedactedStateEventContent + RedactContent> {
pub content: C,
pub event_id: Option<OwnedEventId>,
}Expand description
A minimal state event.
This type can hold a possibly-redacted state event with an optional event ID. The event ID is optional so this type can also hold events from invited rooms, where event IDs are not available.
Fields§
§content: CThe event’s content.
event_id: Option<OwnedEventId>The event’s ID, if known.
Implementations§
Source§impl<C> MinimalStateEvent<C>
impl<C> MinimalStateEvent<C>
Trait Implementations§
Source§impl<C: Clone + PossiblyRedactedStateEventContent + RedactContent> Clone for MinimalStateEvent<C>
impl<C: Clone + PossiblyRedactedStateEventContent + RedactContent> Clone for MinimalStateEvent<C>
Source§fn clone(&self) -> MinimalStateEvent<C>
fn clone(&self) -> MinimalStateEvent<C>
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<C: Debug + PossiblyRedactedStateEventContent + RedactContent> Debug for MinimalStateEvent<C>
impl<C: Debug + PossiblyRedactedStateEventContent + RedactContent> Debug for MinimalStateEvent<C>
Source§impl<'de, C> Deserialize<'de> for MinimalStateEvent<C>
impl<'de, C> Deserialize<'de> for MinimalStateEvent<C>
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<C> From<&StrippedStateEvent<C>> for MinimalStateEvent<C>
impl<C> From<&StrippedStateEvent<C>> for MinimalStateEvent<C>
Source§fn from(event: &StrippedStateEvent<C>) -> Self
fn from(event: &StrippedStateEvent<C>) -> Self
Converts to this type from the input type.
Source§impl From<&StrippedStateEvent<RoomCreateEventContent>> for MinimalStateEvent<RoomCreateWithCreatorEventContent>
impl From<&StrippedStateEvent<RoomCreateEventContent>> for MinimalStateEvent<RoomCreateWithCreatorEventContent>
Source§fn from(event: &StrippedRoomCreateEvent) -> Self
fn from(event: &StrippedRoomCreateEvent) -> Self
Converts to this type from the input type.
Source§impl<C1, C2> From<&SyncStateEvent<C1>> for MinimalStateEvent<C2>where
C1: Clone + StaticStateEventContent + RedactContent + Into<C2>,
C1::Redacted: Clone + RedactedStateEventContent + Into<C2>,
C2: PossiblyRedactedStateEventContent + RedactContent,
impl<C1, C2> From<&SyncStateEvent<C1>> for MinimalStateEvent<C2>where
C1: Clone + StaticStateEventContent + RedactContent + Into<C2>,
C1::Redacted: Clone + RedactedStateEventContent + Into<C2>,
C2: PossiblyRedactedStateEventContent + RedactContent,
Source§fn from(ev: &SyncStateEvent<C1>) -> Self
fn from(ev: &SyncStateEvent<C1>) -> Self
Converts to this type from the input type.
Source§impl From<&SyncStateEvent<RoomCreateEventContent>> for MinimalStateEvent<RoomCreateWithCreatorEventContent>
impl From<&SyncStateEvent<RoomCreateEventContent>> for MinimalStateEvent<RoomCreateWithCreatorEventContent>
Source§fn from(ev: &SyncRoomCreateEvent) -> Self
fn from(ev: &SyncRoomCreateEvent) -> Self
Converts to this type from the input type.
Source§impl<C> From<StrippedStateEvent<C>> for MinimalStateEvent<C>where
C: PossiblyRedactedStateEventContent + RedactContent,
impl<C> From<StrippedStateEvent<C>> for MinimalStateEvent<C>where
C: PossiblyRedactedStateEventContent + RedactContent,
Source§fn from(event: StrippedStateEvent<C>) -> Self
fn from(event: StrippedStateEvent<C>) -> Self
Converts to this type from the input type.
Source§impl<C1, C2> From<SyncStateEvent<C1>> for MinimalStateEvent<C2>where
C1: StaticStateEventContent + RedactContent + Into<C2>,
C1::Redacted: RedactedStateEventContent + Into<C2>,
C2: PossiblyRedactedStateEventContent + RedactContent,
impl<C1, C2> From<SyncStateEvent<C1>> for MinimalStateEvent<C2>where
C1: StaticStateEventContent + RedactContent + Into<C2>,
C1::Redacted: RedactedStateEventContent + Into<C2>,
C2: PossiblyRedactedStateEventContent + RedactContent,
Source§fn from(ev: SyncStateEvent<C1>) -> Self
fn from(ev: SyncStateEvent<C1>) -> Self
Converts to this type from the input type.
Source§impl<C> Serialize for MinimalStateEvent<C>
impl<C> Serialize for MinimalStateEvent<C>
Auto Trait Implementations§
impl<C> Freeze for MinimalStateEvent<C>where
C: Freeze,
impl<C> RefUnwindSafe for MinimalStateEvent<C>where
C: RefUnwindSafe,
impl<C> Send for MinimalStateEvent<C>where
C: Send,
impl<C> Sync for MinimalStateEvent<C>where
C: Sync,
impl<C> Unpin for MinimalStateEvent<C>where
C: Unpin,
impl<C> UnsafeUnpin for MinimalStateEvent<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for MinimalStateEvent<C>where
C: UnwindSafe,
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> CompatExt for T
impl<T> CompatExt for T
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for 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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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 more