pub struct EncodedOwnedFrame { /* private fields */ }Expand description
Encoded owned frame returned by an owned core.
Implementations§
Source§impl EncodedOwnedFrame
impl EncodedOwnedFrame
Sourcepub fn new(encoded_metadata: impl Into<Vec<u8>>, payload: Option<Bytes>) -> Self
pub fn new(encoded_metadata: impl Into<Vec<u8>>, payload: Option<Bytes>) -> Self
Creates an encoded owned frame from selected-wire metadata bytes and payload.
Sourcepub fn encoded_metadata(&self) -> &[u8] ⓘ
pub fn encoded_metadata(&self) -> &[u8] ⓘ
Returns selected-wire encoded metadata bytes.
Sourcepub fn decode<W, C>(self, codec: &C) -> Result<UOwnedFrame, UStatus>where
W: UWire,
C: UWireMetadataCodecFor<W>,
pub fn decode<W, C>(self, codec: &C) -> Result<UOwnedFrame, UStatus>where
W: UWire,
C: UWireMetadataCodecFor<W>,
Decodes this raw frame into a public owned frame.
§Errors
Returns an error if selected-wire metadata decode or owned-frame validation fails.
Sourcepub fn into_parts(self) -> (Vec<u8>, Option<Bytes>)
pub fn into_parts(self) -> (Vec<u8>, Option<Bytes>)
Consumes this frame and returns its parts.
Trait Implementations§
Source§impl Clone for EncodedOwnedFrame
impl Clone for EncodedOwnedFrame
Source§fn clone(&self) -> EncodedOwnedFrame
fn clone(&self) -> EncodedOwnedFrame
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 EncodedOwnedFrame
impl Debug for EncodedOwnedFrame
Source§impl PartialEq for EncodedOwnedFrame
impl PartialEq for EncodedOwnedFrame
impl StructuralPartialEq for EncodedOwnedFrame
Auto Trait Implementations§
impl !Freeze for EncodedOwnedFrame
impl RefUnwindSafe for EncodedOwnedFrame
impl Send for EncodedOwnedFrame
impl Sync for EncodedOwnedFrame
impl Unpin for EncodedOwnedFrame
impl UnwindSafe for EncodedOwnedFrame
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.