Struct fidl_next::RawWireUnion
source · #[repr(C)]pub struct RawWireUnion<'buf> { /* private fields */ }
Expand description
A raw FIDL union
Implementations§
source§impl<'buf> RawWireUnion<'buf>
impl<'buf> RawWireUnion<'buf>
sourcepub fn encode_absent(slot: Slot<'_, Self>)
pub fn encode_absent(slot: Slot<'_, Self>)
Encodes that a union is absent in a slot.
sourcepub fn encode_as<E: Encoder + ?Sized, T: Encode<E>>(
value: &mut T,
ord: u64,
encoder: &mut E,
slot: Slot<'_, Self>,
) -> Result<(), EncodeError>
pub fn encode_as<E: Encoder + ?Sized, T: Encode<E>>( value: &mut T, ord: u64, encoder: &mut E, slot: Slot<'_, Self>, ) -> Result<(), EncodeError>
Encodes a value and ordinal in a slot.
sourcepub fn encoded_ordinal(slot: Slot<'_, Self>) -> u64
pub fn encoded_ordinal(slot: Slot<'_, Self>) -> u64
Returns the ordinal of the encoded value.
sourcepub fn decode_absent(slot: Slot<'_, Self>) -> Result<(), DecodeError>
pub fn decode_absent(slot: Slot<'_, Self>) -> Result<(), DecodeError>
Decodes an absent union from a slot.
sourcepub fn decode_unknown<D: Decoder<'buf> + ?Sized>(
slot: Slot<'_, Self>,
decoder: &mut D,
) -> Result<(), DecodeError>
pub fn decode_unknown<D: Decoder<'buf> + ?Sized>( slot: Slot<'_, Self>, decoder: &mut D, ) -> Result<(), DecodeError>
Decodes an unknown value from a union.
The handles owned by the unknown value are discarded.
sourcepub fn decode_as<D: Decoder<'buf> + ?Sized, T: Decode<D>>(
slot: Slot<'_, Self>,
decoder: &mut D,
) -> Result<(), DecodeError>
pub fn decode_as<D: Decoder<'buf> + ?Sized, T: Decode<D>>( slot: Slot<'_, Self>, decoder: &mut D, ) -> Result<(), DecodeError>
Decodes the typed value in a union.
sourcepub fn get(&self) -> &WireEnvelope<'buf>
pub fn get(&self) -> &WireEnvelope<'buf>
Gets a reference to the envelope underlying the union.
sourcepub fn get_mut(&mut self) -> &mut WireEnvelope<'buf>
pub fn get_mut(&mut self) -> &mut WireEnvelope<'buf>
Gets a mutable reference to the envelope underlying the union.
Auto Trait Implementations§
impl<'buf> Freeze for RawWireUnion<'buf>
impl<'buf> RefUnwindSafe for RawWireUnion<'buf>
impl<'buf> !Send for RawWireUnion<'buf>
impl<'buf> !Sync for RawWireUnion<'buf>
impl<'buf> Unpin for RawWireUnion<'buf>
impl<'buf> !UnwindSafe for RawWireUnion<'buf>
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