Struct OptionULE

struct OptionULE<U>(_, _)

This type is the ULE type for Option<U> where U is a ULE type

Example

use zerovec::ZeroVec;

let z = ZeroVec::alloc_from_slice(&[
    Some('a'),
    Some('á'),
    Some('ø'),
    None,
    Some('ł'),
]);

assert_eq!(z.get(2), Some(Some('ø')));
assert_eq!(z.get(3), Some(None));

Implementations

impl<U: Copy> OptionULE<U>

fn get(self: Self) -> Option<U>

Obtain this as an Option<T>

fn new(opt: Option<U>) -> Self

Construct an OptionULE<U> from an equivalent Option<T>

impl<T> Any for OptionULE<U>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for OptionULE<U>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for OptionULE<U>

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

impl<T> CloneToUninit for OptionULE<U>

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> ErasedDestructor for OptionULE<U>

impl<T> From for OptionULE<U>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for OptionULE<U>

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for OptionULE<U>

fn into(self: Self) -> U

Calls U::from(self).

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

impl<T, U> TryFrom for OptionULE<U>

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

impl<T, U> TryInto for OptionULE<U>

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

impl<U> Freeze for OptionULE<U>

impl<U> RefUnwindSafe for OptionULE<U>

impl<U> Send for OptionULE<U>

impl<U> Sync for OptionULE<U>

impl<U> Unpin for OptionULE<U>

impl<U> UnsafeUnpin for OptionULE<U>

impl<U> UnwindSafe for OptionULE<U>

impl<U: Copy + Eq> Eq for OptionULE<U>

impl<U: Copy + PartialEq> PartialEq for OptionULE<U>

fn eq(self: &Self, other: &Self) -> bool

impl<U: Copy + core::fmt::Debug> Debug for OptionULE<U>

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl<U: Copy> Clone for OptionULE<U>

fn clone(self: &Self) -> Self

impl<U: Copy> Copy for OptionULE<U>

impl<U: ULE> ULE for OptionULE<U>

fn validate_bytes(bytes: &[u8]) -> Result<(), UleError>