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 moreSource§impl Debug for RoomListLoadingState
impl Debug for RoomListLoadingState
Source§impl PartialEq for RoomListLoadingState
impl PartialEq for RoomListLoadingState
impl Eq for RoomListLoadingState
impl StructuralPartialEq for RoomListLoadingState
Auto 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,
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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