pub struct RawTail<R> { /* private fields */ }Expand description
The raw read side the pkt-line machinery surrenders to the push
machine (the raw-tail escape, ADR-013 §3 as amended by ADR-020 §1):
an async reader over the bytes remaining after the request’s
terminating flush — on the duplex substrate the transport’s read
half past the flush, on the stateless substrate the POST body’s
remaining bytes. Reads count into the substrate’s consumed-bytes
counter, so the tail’s consumption reconciles against the session’s
(the request-side counter) — the budget observability the
wire-side pack-size relay rides
(crate::pack_source::bridge_pack_source).
Contract stamp: ADR-013 §3 (the pack is raw, to end of body/stream), ADR-020 §1 (the bounded peek watches this tail — the escape is its precondition), ADR-005 §1 (the flush boundary the tail continues from), ADR-009 (the budget observability).
Implementations§
Source§impl<R> RawTail<R>
impl<R> RawTail<R>
Sourcepub fn new(read: R, consumed: Arc<AtomicU64>) -> Self
pub fn new(read: R, consumed: Arc<AtomicU64>) -> Self
Composes a tail over (raw reader, shared consumed-bytes
counter) — the substrates’ escape constructor
(Session::take_raw_tail /
StatelessRequest::take_raw_tail);
pub for the same pre-publish posture as the serving entries (the
machine-level test compositions ride it too — one wire shape,
one constructor).
Sourcepub fn consumed_bytes(&self) -> u64
pub fn consumed_bytes(&self) -> u64
The substrate’s consumed-bytes counter (the read side’s total — framed request bytes plus tail bytes, one shared counter for budget observability; reconciling is tail + framed = this).
Trait Implementations§
Auto Trait Implementations§
impl<R> Freeze for RawTail<R>where
R: Freeze,
impl<R> RefUnwindSafe for RawTail<R>where
R: RefUnwindSafe,
impl<R> Send for RawTail<R>where
R: Send,
impl<R> Sync for RawTail<R>where
R: Sync,
impl<R> Unpin for RawTail<R>where
R: Unpin,
impl<R> UnsafeUnpin for RawTail<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for RawTail<R>where
R: UnwindSafe,
Blanket Implementations§
Source§impl<R> AsyncReadExt for R
impl<R> AsyncReadExt for R
Source§fn chain<R>(self, next: R) -> Chain<Self, R>
fn chain<R>(self, next: R) -> Chain<Self, R>
Source§fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self> ⓘwhere
Self: Unpin,
fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self> ⓘwhere
Self: Unpin,
buf in asynchronous
manner, returning a future type. Read moreSource§fn read_vectored<'a>(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>],
) -> ReadVectored<'a, Self> ⓘwhere
Self: Unpin,
fn read_vectored<'a>(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>],
) -> ReadVectored<'a, Self> ⓘwhere
Self: Unpin,
AsyncRead into bufs using vectored
IO operations. Read moreSource§fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self> ⓘwhere
Self: Unpin,
fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self> ⓘwhere
Self: Unpin,
buf,
returning an error if end of file (EOF) is hit sooner. Read moreSource§fn read_to_end<'a>(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEnd<'a, Self> ⓘwhere
Self: Unpin,
fn read_to_end<'a>(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEnd<'a, Self> ⓘwhere
Self: Unpin,
AsyncRead. Read moreSource§fn read_to_string<'a>(
&'a mut self,
buf: &'a mut String,
) -> ReadToString<'a, Self> ⓘwhere
Self: Unpin,
fn read_to_string<'a>(
&'a mut self,
buf: &'a mut String,
) -> ReadToString<'a, Self> ⓘwhere
Self: Unpin,
AsyncRead. Read moreSource§impl<R> AsyncReadExt for R
impl<R> AsyncReadExt for R
Source§fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadFuture<'a, Self> ⓘwhere
Self: Unpin,
fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadFuture<'a, Self> ⓘwhere
Self: Unpin,
Source§fn read_vectored<'a>(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>],
) -> ReadVectoredFuture<'a, Self> ⓘwhere
Self: Unpin,
fn read_vectored<'a>(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>],
) -> ReadVectoredFuture<'a, Self> ⓘwhere
Self: Unpin,
Source§fn read_to_end<'a>(
&'a mut self,
buf: &'a mut Vec<u8>,
) -> ReadToEndFuture<'a, Self> ⓘwhere
Self: Unpin,
fn read_to_end<'a>(
&'a mut self,
buf: &'a mut Vec<u8>,
) -> ReadToEndFuture<'a, Self> ⓘwhere
Self: Unpin,
Source§fn read_to_string<'a>(
&'a mut self,
buf: &'a mut String,
) -> ReadToStringFuture<'a, Self> ⓘwhere
Self: Unpin,
fn read_to_string<'a>(
&'a mut self,
buf: &'a mut String,
) -> ReadToStringFuture<'a, Self> ⓘwhere
Self: Unpin,
Source§fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExactFuture<'a, Self> ⓘwhere
Self: Unpin,
fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExactFuture<'a, Self> ⓘwhere
Self: Unpin,
buf. Read moreSource§fn take(self, limit: u64) -> Take<Self>where
Self: Sized,
fn take(self, limit: u64) -> Take<Self>where
Self: Sized,
limit bytes from it. Read more