#[repr(C)]pub struct RawWireUnion { /* private fields */ }
Expand description
A raw FIDL union
Implementations§
Source§impl RawWireUnion
impl RawWireUnion
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_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 an unknown 'static
value from a union.
The handles owned by the unknown value are discarded.
Sourcepub fn decode_unknown<'buf, D: Decoder<'buf> + ?Sized>(
slot: Slot<'_, Self>,
decoder: &mut D,
) -> Result<(), DecodeError>
pub fn decode_unknown<'buf, 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_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 the typed 'static
value in a union.
Sourcepub fn decode_as<'buf, D: Decoder<'buf> + ?Sized, T: Decode<D>>(
slot: Slot<'_, Self>,
decoder: &mut D,
) -> Result<(), DecodeError>
pub fn decode_as<'buf, 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
pub fn get(&self) -> &WireEnvelope
Gets a reference to the envelope underlying the union.
Sourcepub fn get_mut(&mut self) -> &mut WireEnvelope
pub fn get_mut(&mut self) -> &mut WireEnvelope
Gets a mutable reference to the envelope underlying the union.
Sourcepub unsafe fn clone_unchecked<T: Clone>(&self) -> Self
pub unsafe fn clone_unchecked<T: Clone>(&self) -> Self
Clones the union, assuming that it contains an inline T
.
§Safety
The union must have been successfully decoded as a T
.
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