pub struct RoomInfoV1 { /* private fields */ }
Expand description
RoomInfo
version 1.
The name
field in RoomNameEventContent
was optional and has become
required. It means that sometimes the field has been serialized with the
value null
.
For the migration:
- Deserialize the stored room info using this type,
- Get the
m.room.create
event for the room, if it is available, - Convert this to
RoomInfo
with.migrate(create_event)
, - Replace the room info in the store.
Implementations§
Source§impl RoomInfoV1
impl RoomInfoV1
Sourcepub fn migrate(
self,
create: Option<&SyncOrStrippedState<RoomCreateEventContent>>,
) -> RoomInfo
pub fn migrate( self, create: Option<&SyncOrStrippedState<RoomCreateEventContent>>, ) -> RoomInfo
Migrate this to a RoomInfo
, using the given m.room.create
event
from the room state.
Trait Implementations§
Source§impl Clone for RoomInfoV1
impl Clone for RoomInfoV1
Source§fn clone(&self) -> RoomInfoV1
fn clone(&self) -> RoomInfoV1
Returns a copy 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 RoomInfoV1
impl Debug for RoomInfoV1
Source§impl<'de> Deserialize<'de> for RoomInfoV1
impl<'de> Deserialize<'de> for RoomInfoV1
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
Auto Trait Implementations§
impl Freeze for RoomInfoV1
impl RefUnwindSafe for RoomInfoV1
impl Send for RoomInfoV1
impl Sync for RoomInfoV1
impl Unpin for RoomInfoV1
impl UnwindSafe for RoomInfoV1
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,
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>
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