pub(crate) struct StreamReceiver {
pub(super) data: Receiver<Held>,
pub(super) reset: CancellationToken,
pub(super) remote_closed: Arc<AtomicBool>,
pub(super) _live: Arc<Live>,
}Expand description
The data the client sends on a stream.
Fields§
§data: Receiver<Held>§reset: CancellationToken§remote_closed: Arc<AtomicBool>§_live: Arc<Live>Implementations§
Source§impl StreamReceiver
impl StreamReceiver
Sourcepub(crate) async fn recv(&mut self) -> Option<Bytes>
pub(crate) async fn recv(&mut self) -> Option<Bytes>
The next data, None once the client closed its side, the stream got
reset or the connection ended.
Sourcepub(crate) async fn recv_held(&mut self) -> Option<Held>
pub(crate) async fn recv_held(&mut self) -> Option<Held>
The next data like Self::recv, which still counts against the
budget of the connection while it is held.
Sourcepub(crate) fn is_closed_by_client(&self) -> bool
pub(crate) fn is_closed_by_client(&self) -> bool
Whether the client closed its side, also if the stream got reset or the connection ended afterwards.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StreamReceiver
impl RefUnwindSafe for StreamReceiver
impl Send for StreamReceiver
impl Sync for StreamReceiver
impl Unpin for StreamReceiver
impl UnsafeUnpin for StreamReceiver
impl UnwindSafe for StreamReceiver
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§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> ⓘ
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].