Struct RawWireUnion
#[repr(C)]pub struct RawWireUnion { /* private fields */ }
Expand description
A raw FIDL union
Implementations§
§impl RawWireUnion
impl RawWireUnion
pub fn encode_absent(out: &mut MaybeUninit<RawWireUnion>)
pub fn encode_absent(out: &mut MaybeUninit<RawWireUnion>)
Encodes that a union is absent in a slot.
pub fn encode_as_static<E, T>(
value: &mut T,
ord: u64,
encoder: &mut E,
out: &mut MaybeUninit<RawWireUnion>,
) -> Result<(), EncodeError>
pub fn encode_as_static<E, T>( value: &mut T, ord: u64, encoder: &mut E, out: &mut MaybeUninit<RawWireUnion>, ) -> Result<(), EncodeError>
Encodes a 'static
value and ordinal in a slot.
pub fn encode_as<E, T>(
value: &mut T,
ord: u64,
encoder: &mut E,
out: &mut MaybeUninit<RawWireUnion>,
) -> Result<(), EncodeError>
pub fn encode_as<E, T>( value: &mut T, ord: u64, encoder: &mut E, out: &mut MaybeUninit<RawWireUnion>, ) -> Result<(), EncodeError>
Encodes a value and ordinal in a slot.
pub fn encoded_ordinal(slot: Slot<'_, RawWireUnion>) -> u64
pub fn encoded_ordinal(slot: Slot<'_, RawWireUnion>) -> u64
Returns the ordinal of the encoded value.
pub fn decode_absent(slot: Slot<'_, RawWireUnion>) -> Result<(), DecodeError>
pub fn decode_absent(slot: Slot<'_, RawWireUnion>) -> Result<(), DecodeError>
Decodes an absent union from a slot.
pub fn decode_unknown_static<D>(
slot: Slot<'_, RawWireUnion>,
decoder: &mut D,
) -> Result<(), DecodeError>where
D: InternalHandleDecoder + ?Sized,
pub fn decode_unknown_static<D>(
slot: Slot<'_, RawWireUnion>,
decoder: &mut D,
) -> Result<(), DecodeError>where
D: InternalHandleDecoder + ?Sized,
Decodes an unknown 'static
value from a union.
The handles owned by the unknown value are discarded.
pub fn decode_unknown<D>(
slot: Slot<'_, RawWireUnion>,
decoder: &mut D,
) -> Result<(), DecodeError>
pub fn decode_unknown<D>( slot: Slot<'_, RawWireUnion>, decoder: &mut D, ) -> Result<(), DecodeError>
Decodes an unknown value from a union.
The handles owned by the unknown value are discarded.
pub fn decode_as_static<D, T>(
slot: Slot<'_, RawWireUnion>,
decoder: &mut D,
) -> Result<(), DecodeError>
pub fn decode_as_static<D, T>( slot: Slot<'_, RawWireUnion>, decoder: &mut D, ) -> Result<(), DecodeError>
Decodes the typed 'static
value in a union.
pub fn decode_as<D, T>(
slot: Slot<'_, RawWireUnion>,
decoder: &mut D,
) -> Result<(), DecodeError>
pub fn decode_as<D, T>( slot: Slot<'_, RawWireUnion>, decoder: &mut D, ) -> Result<(), DecodeError>
Decodes the typed value in a union.
pub fn absent() -> RawWireUnion
pub fn absent() -> RawWireUnion
The absent optional union.
pub fn get(&self) -> &WireEnvelope
pub fn get(&self) -> &WireEnvelope
Gets a reference to the envelope underlying the union.
pub unsafe fn clone_unchecked<T>(&self) -> RawWireUnionwhere
T: Clone,
pub unsafe fn clone_unchecked<T>(&self) -> RawWireUnionwhere
T: Clone,
Clones the union, assuming that it contains an inline T
.
§Safety
The union must have been successfully decoded as a T
.
Trait Implementations§
§impl ZeroPadding for RawWireUnion
impl ZeroPadding for RawWireUnion
§fn zero_padding(_: &mut MaybeUninit<RawWireUnion>)
fn zero_padding(_: &mut MaybeUninit<RawWireUnion>)
Writes zeroes to the padding for this type, if any.
Auto Trait Implementations§
impl Freeze for RawWireUnion
impl RefUnwindSafe for RawWireUnion
impl !Send for RawWireUnion
impl !Sync for RawWireUnion
impl Unpin for RawWireUnion
impl UnwindSafe for RawWireUnion
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