pub struct UVecRxLease { /* private fields */ }Expand description
In-memory receive lease for tests and examples that need receive-lease shape.
Implementations§
Source§impl UVecRxLease
impl UVecRxLease
Sourcepub fn new(
metadata: UFrameMetadata,
payload: Option<Vec<u8>>,
) -> Result<Self, UStatus>
pub fn new( metadata: UFrameMetadata, payload: Option<Vec<u8>>, ) -> Result<Self, UStatus>
Creates an in-memory receive lease after validation.
§Errors
Returns an error if metadata or payload presence is invalid.
Sourcepub fn new_unchecked(metadata: UFrameMetadata, payload: Option<Vec<u8>>) -> Self
pub fn new_unchecked(metadata: UFrameMetadata, payload: Option<Vec<u8>>) -> Self
Creates an in-memory receive lease without validation.
Sourcepub fn into_parts(self) -> (UFrameMetadata, Option<Vec<u8>>)
pub fn into_parts(self) -> (UFrameMetadata, Option<Vec<u8>>)
Consumes the lease and returns metadata plus optional payload bytes.
Trait Implementations§
Source§impl Clone for UVecRxLease
impl Clone for UVecRxLease
Source§fn clone(&self) -> UVecRxLease
fn clone(&self) -> UVecRxLease
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UVecRxLease
impl Debug for UVecRxLease
Source§impl PartialEq for UVecRxLease
impl PartialEq for UVecRxLease
Source§impl UFrameView for UVecRxLease
impl UFrameView for UVecRxLease
Source§type PayloadReader<'a> = Cursor<&'a [u8]>
where
Self: 'a
type PayloadReader<'a> = Cursor<&'a [u8]> where Self: 'a
Reader over the payload bytes in order.
Source§type PayloadSlices<'a> = IntoIter<&'a [u8]>
where
Self: 'a
type PayloadSlices<'a> = IntoIter<&'a [u8]> where Self: 'a
Iterator over the payload’s storage segments in order.
Source§fn metadata(&self) -> &UFrameMetadata
fn metadata(&self) -> &UFrameMetadata
Returns the native frame metadata.
Source§fn payload_len(&self) -> usize
fn payload_len(&self) -> usize
Returns the number of application payload bytes visible through this view.
Source§fn has_payload(&self) -> bool
fn has_payload(&self) -> bool
Returns whether this view carries a payload, including a present empty payload.
Source§fn payload_reader(&self) -> Self::PayloadReader<'_>
fn payload_reader(&self) -> Self::PayloadReader<'_>
Returns an ordered reader over the application payload bytes.
Source§fn payload_slices(&self) -> Self::PayloadSlices<'_>
fn payload_slices(&self) -> Self::PayloadSlices<'_>
Returns ordered borrowed payload slices.
Source§fn try_contiguous_payload(&self) -> Option<&[u8]>
fn try_contiguous_payload(&self) -> Option<&[u8]>
Returns a contiguous borrowed payload view when this view can provide one without copying.
Source§fn decode_payload_from_reader_as<C, T>(&self) -> Result<T, UWireError>where
C: PayloadCodec + ReadDecodePayload<T>,
fn decode_payload_from_reader_as<C, T>(&self) -> Result<T, UWireError>where
C: PayloadCodec + ReadDecodePayload<T>,
Decodes this frame view from its ordered payload reader with codec
C. Read moreSource§impl ULoanedContiguousZeroCopyRxFrame for UVecRxLease
impl ULoanedContiguousZeroCopyRxFrame for UVecRxLease
Source§fn loaned_contiguous_payload(&self) -> Result<LoanedPayload<'_>, UWireError>
fn loaned_contiguous_payload(&self) -> Result<LoanedPayload<'_>, UWireError>
Returns one contiguous loan-backed application payload view. Read more
Source§fn payload_loan_provenance(&self) -> Result<PayloadLoanProvenance, UWireError>
fn payload_loan_provenance(&self) -> Result<PayloadLoanProvenance, UWireError>
Returns diagnostic provenance for successful loaned payload borrows.
Source§fn try_loaned_contiguous_payload(&self) -> Result<&[u8], UWireError>
fn try_loaned_contiguous_payload(&self) -> Result<&[u8], UWireError>
Returns only loan-backed contiguous payload bytes.
Source§fn borrow_stable_payload<T>(&self) -> Result<&T, UWireError>where
T: StablePayload,
fn borrow_stable_payload<T>(&self) -> Result<&T, UWireError>where
T: StablePayload,
Borrows one stable-container value from loan-backed contiguous storage.
Source§fn borrow_payload_as<C, T>(&self) -> Result<&T, UWireError>where
C: BorrowPayload<T>,
fn borrow_payload_as<C, T>(&self) -> Result<&T, UWireError>where
C: BorrowPayload<T>,
Borrows one typed value from loan-backed contiguous storage using codec
C. Read moreimpl StructuralPartialEq for UVecRxLease
impl UZeroCopyRxLease for UVecRxLease
Auto Trait Implementations§
impl Freeze for UVecRxLease
impl RefUnwindSafe for UVecRxLease
impl Send for UVecRxLease
impl Sync for UVecRxLease
impl Unpin for UVecRxLease
impl UnwindSafe for UVecRxLease
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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<TCore> UWithNativePrefixWire for TCore
impl<TCore> UWithNativePrefixWire for TCore
Source§fn into_native_prefix_wire_transport<W>(
self,
wire: W,
) -> UWireTransport<TCore, W, NativePrefixFrameMetadataCodec>where
W: UWire,
fn into_native_prefix_wire_transport<W>(
self,
wire: W,
) -> UWireTransport<TCore, W, NativePrefixFrameMetadataCodec>where
W: UWire,
Wraps this core with an external or custom selected wire using canonical metadata.
Source§fn into_protobuf_transport(
self,
) -> UWireTransport<TCore, ProtobufWire, NativePrefixFrameMetadataCodec>
fn into_protobuf_transport( self, ) -> UWireTransport<TCore, ProtobufWire, NativePrefixFrameMetadataCodec>
Wraps this core with the Protocol Buffers selected-wire profile.
Source§fn into_stable_container_transport(
self,
) -> UWireTransport<TCore, StableContainerWireFormat, NativePrefixFrameMetadataCodec>
fn into_stable_container_transport( self, ) -> UWireTransport<TCore, StableContainerWireFormat, NativePrefixFrameMetadataCodec>
Wraps this core with the stable-container selected-wire profile.