pub enum UTxPayloadSpec {
Absent,
Present {
len: usize,
alignment: PayloadAlignment,
},
}Expand description
Payload presence and layout requested for a transmit loan.
Variants§
Absent
The frame carries no payload and no payload encoding metadata.
Present
The frame carries a payload, including a present empty payload.
Implementations§
Source§impl UTxPayloadSpec
impl UTxPayloadSpec
Sourcepub fn present(len: usize, alignment: usize) -> Result<Self, UStatus>
pub fn present(len: usize, alignment: usize) -> Result<Self, UStatus>
Creates a present-payload spec from length and alignment.
§Errors
Returns an error if alignment is zero or not a power of two.
Sourcepub fn present_with_alignment(len: usize, alignment: PayloadAlignment) -> Self
pub fn present_with_alignment(len: usize, alignment: PayloadAlignment) -> Self
Creates a present-payload spec from length and a validated alignment.
Sourcepub fn present_empty() -> Self
pub fn present_empty() -> Self
Creates a present-empty-payload spec.
Sourcepub fn is_present(self) -> bool
pub fn is_present(self) -> bool
Returns whether this spec represents a present payload.
Sourcepub fn payload_alignment(self) -> PayloadAlignment
pub fn payload_alignment(self) -> PayloadAlignment
Returns the validated payload alignment proof for this spec.
Trait Implementations§
Source§impl Clone for UTxPayloadSpec
impl Clone for UTxPayloadSpec
Source§fn clone(&self) -> UTxPayloadSpec
fn clone(&self) -> UTxPayloadSpec
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 UTxPayloadSpec
impl Debug for UTxPayloadSpec
Source§impl PartialEq for UTxPayloadSpec
impl PartialEq for UTxPayloadSpec
impl Copy for UTxPayloadSpec
impl Eq for UTxPayloadSpec
impl StructuralPartialEq for UTxPayloadSpec
Auto Trait Implementations§
impl Freeze for UTxPayloadSpec
impl RefUnwindSafe for UTxPayloadSpec
impl Send for UTxPayloadSpec
impl Sync for UTxPayloadSpec
impl Unpin for UTxPayloadSpec
impl UnwindSafe for UTxPayloadSpec
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.