pub struct UserOutboundReceiver {
messages: Receiver<QueuedUserOutbound>,
overflow: Receiver<Option<UserOutboundOverflow>>,
metrics: Arc<RuntimeMetrics>,
queued_bytes: Arc<AtomicUsize>,
}Fields§
§messages: Receiver<QueuedUserOutbound>§overflow: Receiver<Option<UserOutboundOverflow>>§metrics: Arc<RuntimeMetrics>§queued_bytes: Arc<AtomicUsize>Implementations§
Source§impl UserOutboundReceiver
impl UserOutboundReceiver
pub fn has_overflowed(&self) -> bool
Sourcepub async fn recv(&mut self) -> Option<UserOutbound>
pub async fn recv(&mut self) -> Option<UserOutbound>
Receives queued output without observing overflow.
User-session loops should use Self::recv_event.
Sourcepub fn try_recv(&mut self) -> Result<UserOutbound, TryRecvError>
pub fn try_recv(&mut self) -> Result<UserOutbound, TryRecvError>
Attempts to receive queued output without observing overflow.
User-session loops should use Self::recv_event.
§Errors
Returns [mpsc::error::TryRecvError::Empty] when no output is queued and
[mpsc::error::TryRecvError::Disconnected] when every sender is dropped.
Sourcepub async fn recv_event(&mut self) -> UserOutboundEvent
pub async fn recv_event(&mut self) -> UserOutboundEvent
Receives the next queue event with overflow prioritized over queued output.
Trait Implementations§
Source§impl Debug for UserOutboundReceiver
impl Debug for UserOutboundReceiver
Auto Trait Implementations§
impl Freeze for UserOutboundReceiver
impl RefUnwindSafe for UserOutboundReceiver
impl Send for UserOutboundReceiver
impl Sync for UserOutboundReceiver
impl Unpin for UserOutboundReceiver
impl UnsafeUnpin for UserOutboundReceiver
impl UnwindSafe for UserOutboundReceiver
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> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§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