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
§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>
Consume a handle, getting back the initial
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>
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