#[repr(packed)]
pub struct OptionULE<U>(_, _);
Expand description

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

Obtain this as an Option

Construct an OptionULE from an equivalent Option

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

zeroed or valid-T byte sequences to fill it)

Validates a byte slice, &[u8]. Read more

Parses a byte slice, &[u8], and return it as &[Self] with the same lifetime. Read more

Takes a byte slice, &[u8], and return it as &[Self] with the same lifetime, assuming that this byte slice has previously been run through Self::parse_byte_slice() with success. Read more

Given &[Self], returns a &[u8] with the same lifetime. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.