WireEnvelope

Union WireEnvelope 

Source
pub union WireEnvelope {
    /* private fields */
}
Expand description

A FIDL envelope

Implementations§

Source§

impl WireEnvelope

Source

pub fn encode_zero(out: &mut MaybeUninit<Self>)

Encodes a zero envelope into a slot.

Source

pub fn encode_value_static<E: InternalHandleEncoder + ?Sized, T: Encode<E>>( value: T, encoder: &mut E, out: &mut MaybeUninit<Self>, constraint: <T::Encoded as Constrained>::Constraint, ) -> Result<(), EncodeError>

Encodes a 'static value into an envelope with an encoder.

Source

pub fn encode_value<E: Encoder + ?Sized, T: Encode<E>>( value: T, encoder: &mut E, out: &mut MaybeUninit<Self>, constraint: <T::Encoded as Constrained>::Constraint, ) -> Result<(), EncodeError>

Encodes a value into an envelope with an encoder.

Source

pub fn zero() -> Self

Returns the zero envelope.

Source

pub fn is_encoded_zero(slot: Slot<'_, Self>) -> bool

Returns whether a envelope slot is encoded as zero.

Source

pub fn is_zero(&self) -> bool

Returns whether an envelope is zero.

Source

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.

Source

pub fn decode_unknown<D: Decoder + ?Sized>( slot: Slot<'_, Self>, decoder: &mut D, ) -> Result<(), DecodeError>

Decodes and discards an unknown value in an envelope.

Source

pub fn decode_as_static<D: InternalHandleDecoder + ?Sized, T: Decode<D>>( slot: Slot<'_, Self>, decoder: &mut D, constraint: <T as Constrained>::Constraint, ) -> Result<(), DecodeError>

Decodes a value of a known type from an envelope.

Source

pub fn decode_as<D: Decoder + ?Sized, T: Decode<D>>( slot: Slot<'_, Self>, decoder: &mut D, constraint: <T as Constrained>::Constraint, ) -> Result<(), DecodeError>

Decodes a value of a known type from an envelope.

Source

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.

Source

pub unsafe fn read_unchecked<T>(&self) -> T

Returns an Owned to the contained T.

§Safety

The envelope must have been successfully decoded as a T.

Source

pub unsafe fn clone_inline_unchecked<T: Clone>(&self) -> Self

Clones the envelope, assuming that it contains an inline T.

§Safety

The envelope must have been successfully decoded inline as a T.

Trait Implementations§

Source§

impl Wire for WireEnvelope

Source§

type Decoded<'de> = WireEnvelope

The decoded wire type, restricted to the 'de lifetime.
Source§

fn zero_padding(_: &mut MaybeUninit<Self>)

Writes zeroes to the padding for this type, if any.
Source§

impl Send for WireEnvelope

Source§

impl Sync for WireEnvelope

Source§

impl Unconstrained for WireEnvelope

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Constrained for T
where T: Unconstrained,

Source§

type Constraint = ()

Type of constraint information for this type.
Source§

fn validate(_: Slot<'_, T>, _: ()) -> Result<(), ValidationError>

Validate a value of this type against a constraint. Can be called when pointers/envelopes are just presence markers.
Source§

impl<T, D> Encode<Ambiguous1, D> for T
where D: ResourceDialect,

Source§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
Source§

impl<T, D> Encode<Ambiguous2, D> for T
where D: ResourceDialect,

Source§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.