pub enum RoomListLoadingState {
NotLoaded,
Loaded {
maximum_number_of_rooms: Option<u32>,
},
}
Expand description
Variants§
NotLoaded
The RoomList
has not been loaded yet, i.e. a sync might run
or not run at all, there is nothing to show in this RoomList
yet.
It’s a good opportunity to show a placeholder to the user.
From Self::NotLoaded
, it’s only possible to move to
Self::Loaded
.
Loaded
The RoomList
has been loaded, i.e. a sync has been run, or more
syncs are running, there is probably something to show to the user.
Either the user has 0 room, in this case, it’s a good opportunity to
show a special screen for that, or the user has multiple rooms, and it’s
the classical room list.
The number of rooms is represented by maximum_number_of_rooms
.
From Self::Loaded
, it’s not possible to move back to
Self::NotLoaded
.
Fields
maximum_number_of_rooms: Option<u32>
The maximum number of rooms a RoomList
contains.
It does not mean that there are exactly this many rooms to display.
Usually, the room entries are represented by Room
. The room
entry might have been synced or not synced yet, but we know for sure
(from the server), that there will be this amount of rooms in the
list at the end.
Note that it’s an Option
, because it may be possible that the
server did miss to send us this value. It’s up to you, dear reader,
to know which default to adopt in case of None
.
Trait Implementations§
source§impl Clone for RoomListLoadingState
impl Clone for RoomListLoadingState
source§fn clone(&self) -> RoomListLoadingState
fn clone(&self) -> RoomListLoadingState
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for RoomListLoadingState
impl RefUnwindSafe for RoomListLoadingState
impl Send for RoomListLoadingState
impl Sync for RoomListLoadingState
impl Unpin for RoomListLoadingState
impl UnwindSafe for RoomListLoadingState
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
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)
clone_to_uninit
)§impl<T> CompatExt for T
impl<T> CompatExt for T
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
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>
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>
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