pub struct StableContainerPayload<T>(/* private fields */);Expand description
Transport-independent stable-container payload identity.
USR-04A uses this type for metadata and owned-byte preservation. Typed
zero-copy borrows are intentionally deferred to the stable borrow proof API.
Implementations§
Source§impl<T: StablePayload> StableContainerPayload<T>
impl<T: StablePayload> StableContainerPayload<T>
Sourcepub const ENCODING_ID: &'static str = STABLE_CONTAINER_ENCODING_ID
pub const ENCODING_ID: &'static str = STABLE_CONTAINER_ENCODING_ID
Native custom encoding id for stable-container payloads.
Sourcepub fn encoding() -> PayloadEncoding
pub fn encoding() -> PayloadEncoding
Returns the stable-container payload encoding for T.
Trait Implementations§
Source§impl<T> BorrowPayload<T> for StableContainerPayload<T>where
T: StablePayload,
impl<T> BorrowPayload<T> for StableContainerPayload<T>where
T: StablePayload,
Source§fn borrow_payload(src: &[u8]) -> Result<&T, UWireError>
fn borrow_payload(src: &[u8]) -> Result<&T, UWireError>
Borrows
T from contiguous payload bytes. Read moreSource§impl<T> Debug for StableContainerPayload<T>
impl<T> Debug for StableContainerPayload<T>
Source§impl<T> LoanPayload<T> for StableContainerPayload<T>where
T: ByteBackedStablePayload + Default,
impl<T> LoanPayload<T> for StableContainerPayload<T>where
T: ByteBackedStablePayload + Default,
Source§fn loan_layout() -> Result<PayloadLayout, UWireError>
fn loan_layout() -> Result<PayloadLayout, UWireError>
Returns the exact layout required for a typed initialized transmit loan. Read more
Source§fn loan_payload(dst: &mut [u8]) -> Result<&mut T, UWireError>
fn loan_payload(dst: &mut [u8]) -> Result<&mut T, UWireError>
Initializes
dst and returns a typed mutable view over the loaned payload. Read moreSource§impl<T> LoanUninitPayload<T> for StableContainerPayload<T>where
T: ByteBackedStablePayload,
impl<T> LoanUninitPayload<T> for StableContainerPayload<T>where
T: ByteBackedStablePayload,
Source§fn loan_uninit_layout() -> Result<PayloadLayout, UWireError>
fn loan_uninit_layout() -> Result<PayloadLayout, UWireError>
Returns the exact layout required for a typed uninitialized transmit loan. Read more
Source§fn loan_uninit_payload<'a>(
dst: LoanedPayloadUninitMut<'a>,
) -> Result<LoanedUninitPayload<'a, T>, UWireError>
fn loan_uninit_payload<'a>( dst: LoanedPayloadUninitMut<'a>, ) -> Result<LoanedUninitPayload<'a, T>, UWireError>
Validates
dst and returns an uninitialized typed payload slot. Read moreSource§impl<T> PayloadCodec for StableContainerPayload<T>where
T: StablePayload,
impl<T> PayloadCodec for StableContainerPayload<T>where
T: StablePayload,
Source§fn codec_name() -> &'static str
fn codec_name() -> &'static str
Stable codec name for logs, diagnostics, and configuration.
Source§fn payload_encoding() -> PayloadEncoding
fn payload_encoding() -> PayloadEncoding
Payload encoding metadata written into frames that use this codec.
Source§fn verify_encoding(actual: Option<&PayloadEncoding>) -> Result<(), UWireError>
fn verify_encoding(actual: Option<&PayloadEncoding>) -> Result<(), UWireError>
Verifies frame encoding metadata against this codec. Read more
Auto Trait Implementations§
impl<T> Freeze for StableContainerPayload<T>
impl<T> RefUnwindSafe for StableContainerPayload<T>where
T: RefUnwindSafe,
impl<T> Send for StableContainerPayload<T>where
T: Send,
impl<T> Sync for StableContainerPayload<T>where
T: Sync,
impl<T> Unpin for StableContainerPayload<T>where
T: Unpin,
impl<T> UnwindSafe for StableContainerPayload<T>where
T: UnwindSafe,
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
§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.