#[repr(C, align(8))]
pub union WireEnvelope {
/* private fields */
}
Expand description
A FIDL envelope
Implementations§
Source§impl WireEnvelope
impl WireEnvelope
Sourcepub fn encode_zero(slot: Slot<'_, Self>)
pub fn encode_zero(slot: Slot<'_, Self>)
Encodes a zero envelope into a slot.
Sourcepub fn encode_value_static<E: InternalHandleEncoder + ?Sized, T: Encode<E>>(
value: &mut T,
encoder: &mut E,
slot: Slot<'_, Self>,
) -> Result<(), EncodeError>
pub fn encode_value_static<E: InternalHandleEncoder + ?Sized, T: Encode<E>>( value: &mut T, encoder: &mut E, slot: Slot<'_, Self>, ) -> Result<(), EncodeError>
Encodes a 'static
value into an envelope with an encoder.
Sourcepub fn encode_value<E: Encoder + ?Sized, T: Encode<E>>(
value: &mut T,
encoder: &mut E,
slot: Slot<'_, Self>,
) -> Result<(), EncodeError>
pub fn encode_value<E: Encoder + ?Sized, T: Encode<E>>( value: &mut T, encoder: &mut E, slot: Slot<'_, Self>, ) -> Result<(), EncodeError>
Encodes a value into an envelope with an encoder.
Sourcepub fn is_encoded_zero(slot: Slot<'_, Self>) -> bool
pub fn is_encoded_zero(slot: Slot<'_, Self>) -> bool
Returns whether a envelope slot is encoded as zero.
Sourcepub fn decode_unknown_static<D: InternalHandleDecoder + ?Sized>(
slot: Slot<'_, Self>,
decoder: &mut D,
) -> Result<(), DecodeError>
pub fn decode_unknown_static<D: InternalHandleDecoder + ?Sized>( slot: Slot<'_, Self>, decoder: &mut D, ) -> Result<(), DecodeError>
Decodes and discards a static type in an envelope.
Sourcepub fn decode_unknown<D: Decoder + ?Sized>(
slot: Slot<'_, Self>,
decoder: &mut D,
) -> Result<(), DecodeError>
pub fn decode_unknown<D: Decoder + ?Sized>( slot: Slot<'_, Self>, decoder: &mut D, ) -> Result<(), DecodeError>
Decodes and discards an unknown value in an envelope.
Sourcepub fn decode_as_static<D: InternalHandleDecoder + ?Sized, T: Decode<D>>(
slot: Slot<'_, Self>,
decoder: &mut D,
) -> Result<(), DecodeError>
pub fn decode_as_static<D: InternalHandleDecoder + ?Sized, T: Decode<D>>( slot: Slot<'_, Self>, decoder: &mut D, ) -> Result<(), DecodeError>
Decodes a value of a known type from an envelope.
Sourcepub fn decode_as<D: Decoder + ?Sized, T: Decode<D>>(
slot: Slot<'_, Self>,
decoder: &mut D,
) -> Result<(), DecodeError>
pub fn decode_as<D: Decoder + ?Sized, T: Decode<D>>( slot: Slot<'_, Self>, decoder: &mut D, ) -> Result<(), DecodeError>
Decodes a value of a known type from an envelope.
Sourcepub unsafe fn deref_unchecked<T>(&self) -> &T
pub unsafe fn deref_unchecked<T>(&self) -> &T
Returns a reference to the contained T
.
§Safety
The envelope must have been successfully decoded as a T
.
Sourcepub unsafe fn clone_unchecked<T: Clone>(&self) -> Self
pub unsafe fn clone_unchecked<T: Clone>(&self) -> Self
Clones the envelope, assuming that it contains an inline T
.
§Safety
The envelope must have been successfully decoded as a T
.
Auto Trait Implementations§
impl Freeze for WireEnvelope
impl RefUnwindSafe for WireEnvelope
impl !Send for WireEnvelope
impl !Sync for WireEnvelope
impl Unpin for WireEnvelope
impl UnwindSafe for WireEnvelope
Blanket Implementations§
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