pub struct UVecTxBuffer { /* private fields */ }Expand description
Owned buffer useful for tests, examples, and adapters that emulate a transmit loan.
Implementations§
Source§impl UVecTxBuffer
impl UVecTxBuffer
Sourcepub fn new(metadata: UFrameMetadata, payload_len: usize) -> Self
pub fn new(metadata: UFrameMetadata, payload_len: usize) -> Self
Creates an owned transmit buffer with payload_len zero-initialized bytes.
Sourcepub fn with_alignment(
metadata: UFrameMetadata,
payload_len: usize,
alignment: usize,
) -> Result<Self, UStatus>
pub fn with_alignment( metadata: UFrameMetadata, payload_len: usize, alignment: usize, ) -> Result<Self, UStatus>
Creates an owned transmit buffer whose visible payload starts at alignment.
§Errors
Returns an error if the requested alignment is invalid or allocation size overflows.
Sourcepub fn into_rx_lease(self) -> UVecRxLease
pub fn into_rx_lease(self) -> UVecRxLease
Converts the buffer into an in-memory receive lease, consuming the emulated loan.
Trait Implementations§
Source§impl Clone for UVecTxBuffer
impl Clone for UVecTxBuffer
Source§fn clone(&self) -> UVecTxBuffer
fn clone(&self) -> UVecTxBuffer
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 UVecTxBuffer
impl Debug for UVecTxBuffer
Source§impl PartialEq for UVecTxBuffer
impl PartialEq for UVecTxBuffer
Source§impl UTxBuffer for UVecTxBuffer
impl UTxBuffer for UVecTxBuffer
Source§fn metadata(&self) -> &UFrameMetadata
fn metadata(&self) -> &UFrameMetadata
Returns the immutable frame metadata associated with this transmit loan.
Source§fn payload_mut(&mut self) -> &mut [u8] ⓘ
fn payload_mut(&mut self) -> &mut [u8] ⓘ
Returns mutable payload storage for direct serialization into the loan.
impl StructuralPartialEq for UVecTxBuffer
Auto Trait Implementations§
impl Freeze for UVecTxBuffer
impl RefUnwindSafe for UVecTxBuffer
impl Send for UVecTxBuffer
impl Sync for UVecTxBuffer
impl Unpin for UVecTxBuffer
impl UnwindSafe for UVecTxBuffer
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.