Enum rkyv::option::ArchivedOption [−][src]
#[repr(u8)] pub enum ArchivedOption<T> { None, Some(T), }
Expand description
Variants
No value
Some value T
Implementations
Inserts v
into the option if it is None
, then returns a mutable
reference to the contained value.
Inserts a value computed from f
into the option if it is None
, then
returns a mutable reference to the contained value.
Trait Implementations
type Error = EnumCheckError<u8>
type Error = EnumCheckError<u8>
The error that may result from checking the type.
unsafe fn check_bytes<'__bytecheck>(
value: *const Self,
context: &mut __C
) -> Result<&'__bytecheck Self, Self::Error>
unsafe fn check_bytes<'__bytecheck>(
value: *const Self,
context: &mut __C
) -> Result<&'__bytecheck Self, Self::Error>
Checks whether the given pointer points to a valid value within the given context. Read more
impl<T: Archive, D: Fallible + ?Sized> Deserialize<Option<T>, D> for ArchivedOption<T::Archived> where
T::Archived: Deserialize<T, D>,
impl<T: Archive, D: Fallible + ?Sized> Deserialize<Option<T>, D> for ArchivedOption<T::Archived> where
T::Archived: Deserialize<T, D>,
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for ArchivedOption<T> where
T: RefUnwindSafe,
impl<T> Send for ArchivedOption<T> where
T: Send,
impl<T> Sync for ArchivedOption<T> where
T: Sync,
impl<T> Unpin for ArchivedOption<T> where
T: Unpin,
impl<T> UnwindSafe for ArchivedOption<T> where
T: UnwindSafe,
Blanket Implementations
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Converts some archived metadata to the pointer metadata for itself.
Mutably borrows from an owned value. Read more
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
D: Fallible + ?Sized,
F: ?Sized,
W: DeserializeWith<F, T, D>,
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
D: Fallible + ?Sized,
F: ?Sized,
W: DeserializeWith<F, T, D>,