Struct matrix_sdk_base::store::migration_helpers::RoomInfoV1
source · 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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
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