pub trait UEncodedRxFrame {
type PayloadReader<'a>: Read + 'a
where Self: 'a;
type PayloadSlices<'a>: Iterator<Item = &'a [u8]> + 'a
where Self: 'a;
// Required methods
fn encoded_metadata(&self) -> &[u8] ⓘ;
fn payload_len(&self) -> usize;
fn payload_reader(&self) -> Self::PayloadReader<'_>;
fn payload_slices(&self) -> Self::PayloadSlices<'_>;
// Provided method
fn try_contiguous_payload(&self) -> Option<&[u8]> { ... }
}Expand description
Raw encoded receive object returned by a transport core.
This is an implementation-boundary trait. Raw encoded receive objects should
not implement public frame or lease traits directly; public receive paths
expose UWireRx<Rx, W, C> after selected-wire metadata decode and validation.
Required Associated Types§
Sourcetype PayloadReader<'a>: Read + 'a
where
Self: 'a
type PayloadReader<'a>: Read + 'a where Self: 'a
Ordered payload reader type.
Sourcetype PayloadSlices<'a>: Iterator<Item = &'a [u8]> + 'a
where
Self: 'a
type PayloadSlices<'a>: Iterator<Item = &'a [u8]> + 'a where Self: 'a
Ordered payload slices iterator type.
Required Methods§
Sourcefn encoded_metadata(&self) -> &[u8] ⓘ
fn encoded_metadata(&self) -> &[u8] ⓘ
Returns selected-wire encoded metadata bytes.
Sourcefn payload_len(&self) -> usize
fn payload_len(&self) -> usize
Returns the visible application payload length.
Sourcefn payload_reader(&self) -> Self::PayloadReader<'_>
fn payload_reader(&self) -> Self::PayloadReader<'_>
Returns an ordered reader over the application payload bytes.
Sourcefn payload_slices(&self) -> Self::PayloadSlices<'_>
fn payload_slices(&self) -> Self::PayloadSlices<'_>
Returns ordered borrowed payload slices.
Provided Methods§
Sourcefn try_contiguous_payload(&self) -> Option<&[u8]>
fn try_contiguous_payload(&self) -> Option<&[u8]>
Returns a contiguous borrowed payload view when available without copying.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.