Struct matrix_sdk_ui::room_list_service::RoomListService
source · pub struct RoomListService { /* private fields */ }
Expand description
The RoomListService
type. See the module’s documentation to learn more.
Implementations§
source§impl RoomListService
impl RoomListService
sourcepub async fn new(client: Client) -> Result<Self, Error>
pub async fn new(client: Client) -> Result<Self, Error>
Create a new RoomList
.
A matrix_sdk::SlidingSync
client will be created, with a cached list
already pre-configured.
This won’t start an encryption sync, and it’s the user’s responsibility
to create one in this case using EncryptionSync
.
sourcepub async fn new_with_encryption(client: Client) -> Result<Self, Error>
pub async fn new_with_encryption(client: Client) -> Result<Self, Error>
Create a new RoomList
that enables encryption.
This will include syncing the encryption information, so there must not
be any instance of EncryptionSync
running in the background.
sourcepub fn sync_indicator(
&self,
delay_before_showing: Duration,
delay_before_hiding: Duration,
) -> impl Stream<Item = SyncIndicator>
pub fn sync_indicator( &self, delay_before_showing: Duration, delay_before_hiding: Duration, ) -> impl Stream<Item = SyncIndicator>
Get a Stream
of SyncIndicator
.
Read the documentation of SyncIndicator
to learn more about it.
sourcepub fn state(&self) -> Subscriber<State>
pub fn state(&self) -> Subscriber<State>
Get a subscriber to the state.
sourcepub fn subscribe_to_rooms(
&self,
room_ids: &[&RoomId],
settings: Option<RoomSubscription>,
)
pub fn subscribe_to_rooms( &self, room_ids: &[&RoomId], settings: Option<RoomSubscription>, )
Subscribe to rooms.
It means that all events from these rooms will be received every time,
no matter how the RoomList
is configured.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RoomListService
impl !RefUnwindSafe for RoomListService
impl Send for RoomListService
impl Sync for RoomListService
impl Unpin for RoomListService
impl !UnwindSafe for RoomListService
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, 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