pub struct SendQueue { /* private fields */ }
Expand description
A client-wide send queue, for all the rooms known by a client.
Implementations§
Source§impl SendQueue
impl SendQueue
Sourcepub async fn respawn_tasks_for_rooms_with_unsent_requests(&self)
pub async fn respawn_tasks_for_rooms_with_unsent_requests(&self)
Reload all the rooms which had unsent requests, and respawn tasks for those rooms.
Sourcepub async fn set_enabled(&self, enabled: bool)
pub async fn set_enabled(&self, enabled: bool)
Enable or disable the send queue for the entire client, i.e. all rooms.
If we’re disabling the queue, and requests were being sent, they’re not aborted, and will continue until a status resolves (error responses will keep the events in the buffer of events to send later). The disablement will happen before the next request is sent.
This may wake up background tasks and resume sending of requests in the background.
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Returns whether the send queue is enabled, at a client-wide granularity.
Sourcepub fn subscribe_errors(&self) -> Receiver<SendQueueRoomError>
pub fn subscribe_errors(&self) -> Receiver<SendQueueRoomError>
A subscriber to the enablement status (enabled or disabled) of the send queue, along with useful errors.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SendQueue
impl !RefUnwindSafe for SendQueue
impl Send for SendQueue
impl Sync for SendQueue
impl Unpin for SendQueue
impl !UnwindSafe for SendQueue
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