Struct WireOptionalVector
pub struct WireOptionalVector<T> { /* private fields */ }
Expand description
An optional FIDL vector
Implementations§
§impl<T> WireOptionalVector<T>
impl<T> WireOptionalVector<T>
pub fn encode_present(slot: Slot<'_, WireOptionalVector<T>>, len: u64)
pub fn encode_present(slot: Slot<'_, WireOptionalVector<T>>, len: u64)
Encodes that a vector is present in a slot.
pub fn encode_absent(slot: Slot<'_, WireOptionalVector<T>>)
pub fn encode_absent(slot: Slot<'_, WireOptionalVector<T>>)
Encodes that a vector is absent in a slot.
pub fn as_ref(&self) -> Option<&WireVector<T>>
pub fn as_ref(&self) -> Option<&WireVector<T>>
Gets a reference to the vector, if any.
pub unsafe fn decode_raw<D>(
slot: Slot<'_, WireOptionalVector<T>>,
decoder: &mut D,
) -> Result<(), DecodeError>
pub unsafe fn decode_raw<D>( slot: Slot<'_, WireOptionalVector<T>>, decoder: &mut D, ) -> Result<(), DecodeError>
Decodes a wire vector which contains raw data.
§Safety
The elements of the wire vecot rmust not need to be individually decoded, and must always be valid.
Trait Implementations§
§impl<T> Debug for WireOptionalVector<T>where
T: Debug,
impl<T> Debug for WireOptionalVector<T>where
T: Debug,
§impl<D, T> Decode<D> for WireOptionalVector<T>
impl<D, T> Decode<D> for WireOptionalVector<T>
§fn decode(
slot: Slot<'_, WireOptionalVector<T>>,
decoder: &mut D,
) -> Result<(), DecodeError>
fn decode( slot: Slot<'_, WireOptionalVector<T>>, decoder: &mut D, ) -> Result<(), DecodeError>
Decodes a value into a slot using a decoder. Read more
§impl<T> Drop for WireOptionalVector<T>
impl<T> Drop for WireOptionalVector<T>
§impl<T, WT> TakeFrom<WireOptionalVector<WT>> for Option<Vec<T>>where
T: TakeFrom<WT>,
impl<T, WT> TakeFrom<WireOptionalVector<WT>> for Option<Vec<T>>where
T: TakeFrom<WT>,
§fn take_from(from: &WireOptionalVector<WT>) -> Option<Vec<T>>
fn take_from(from: &WireOptionalVector<WT>) -> Option<Vec<T>>
Converts from the given
T
, taking any resources that can’t be cloned.§const COPY_OPTIMIZATION: CopyOptimization<Self> = _
const COPY_OPTIMIZATION: CopyOptimization<Self> = _
An optimization flag that allows the bytes of this type to be copied directly during
conversion instead of calling
take_from
. Read moreAuto Trait Implementations§
impl<T> Freeze for WireOptionalVector<T>
impl<T> RefUnwindSafe for WireOptionalVector<T>where
T: RefUnwindSafe,
impl<T> Send for WireOptionalVector<T>where
T: Send,
impl<T> Sync for WireOptionalVector<T>where
T: Sync,
impl<T> Unpin for WireOptionalVector<T>
impl<T> UnwindSafe for WireOptionalVector<T>where
T: RefUnwindSafe,
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