Struct matrix_sdk::sliding_sync::SlidingSyncList
source · pub struct SlidingSyncList { /* private fields */ }
experimental-sliding-sync
only.Expand description
Holding a specific filtered list within the concept of sliding sync.
It is OK to clone this type as much as you need: cloning it is cheap.
Implementations§
source§impl SlidingSyncList
impl SlidingSyncList
sourcepub fn builder(name: impl Into<String>) -> SlidingSyncListBuilder
pub fn builder(name: impl Into<String>) -> SlidingSyncListBuilder
Create a new SlidingSyncListBuilder
with the given name.
sourcepub fn set_sync_mode<M>(&self, sync_mode: M)where
M: Into<SlidingSyncMode>,
pub fn set_sync_mode<M>(&self, sync_mode: M)where
M: Into<SlidingSyncMode>,
Change the sync-mode.
It is sometimes necessary to change the sync-mode of a list on-the-fly.
This will change the sync-mode but also the request generator. A new
request generator is generated. Since requests are calculated based on
the request generator, changing the sync-mode is equivalent to
“resetting” the list. It’s actually not calling Self::reset
, which
means that the state is not reset purposely. The ranges and the
state will be updated when the next request will be sent and a
response will be received. The maximum number of rooms won’t change.
sourcepub fn state(&self) -> SlidingSyncListLoadingState
pub fn state(&self) -> SlidingSyncListLoadingState
Get the current state.
sourcepub fn state_stream(
&self,
) -> (SlidingSyncListLoadingState, impl Stream<Item = SlidingSyncListLoadingState>)
pub fn state_stream( &self, ) -> (SlidingSyncListLoadingState, impl Stream<Item = SlidingSyncListLoadingState>)
Get a stream of state updates.
If this list has been reloaded from a cache, the initial value read from the cache will be published.
There’s no guarantee of ordering between items emitted by this stream and those emitted by other streams exposed on this structure.
The first part of the returned tuple is the actual loading state, and
the second part is the Stream
to receive updates.
sourcepub fn timeline_limit(&self) -> Bound
pub fn timeline_limit(&self) -> Bound
Get the timeline limit.
sourcepub fn set_timeline_limit(&self, timeline: Bound)
pub fn set_timeline_limit(&self, timeline: Bound)
Set timeline limit.
sourcepub fn maximum_number_of_rooms(&self) -> Option<u32>
pub fn maximum_number_of_rooms(&self) -> Option<u32>
Get the maximum number of rooms. See Self::maximum_number_of_rooms
to learn more.
sourcepub fn maximum_number_of_rooms_stream(&self) -> Subscriber<Option<u32>>
pub fn maximum_number_of_rooms_stream(&self) -> Subscriber<Option<u32>>
Get a stream of rooms count.
If this list has been reloaded from a cache, the initial value is published too.
There’s no guarantee of ordering between items emitted by this stream and those emitted by other streams exposed on this structure.
sourcepub fn maybe_commit_sticky(&mut self, txn_id: &TransactionId)
pub fn maybe_commit_sticky(&mut self, txn_id: &TransactionId)
Commit the set of sticky parameters for this list.
Trait Implementations§
source§impl Clone for SlidingSyncList
impl Clone for SlidingSyncList
source§fn clone(&self) -> SlidingSyncList
fn clone(&self) -> SlidingSyncList
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 SlidingSyncList
impl RefUnwindSafe for SlidingSyncList
impl Send for SlidingSyncList
impl Sync for SlidingSyncList
impl Unpin for SlidingSyncList
impl UnwindSafe for SlidingSyncList
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