Struct rkyv::niche::option_nonzero::ArchivedOptionNonZeroI16
source · pub struct ArchivedOptionNonZeroI16 { /* private fields */ }
Expand description
A niched archived Option<NonZeroI16>
Implementations§
source§impl ArchivedOptionNonZeroI16
impl ArchivedOptionNonZeroI16
sourcepub fn as_ref(&self) -> Option<&Archived<NonZeroI16>>
pub fn as_ref(&self) -> Option<&Archived<NonZeroI16>>
Converts to an Option<&Archived<NonZeroI16>>
sourcepub fn as_mut(&mut self) -> Option<&mut Archived<NonZeroI16>>
pub fn as_mut(&mut self) -> Option<&mut Archived<NonZeroI16>>
Converts to an Option<&mut Archived<NonZeroI16>>
sourcepub fn as_seal(this: Seal<'_, Self>) -> Option<Seal<'_, Archived<NonZeroI16>>>
pub fn as_seal(this: Seal<'_, Self>) -> Option<Seal<'_, Archived<NonZeroI16>>>
Converts from Seal<'_, ArchivedOptionNonZeroI16>
to Option<Seal<'_, Archived<NonZeroI16>>>
.
sourcepub fn take(&mut self) -> Option<Archived<NonZeroI16>>
pub fn take(&mut self) -> Option<Archived<NonZeroI16>>
Takes the value out of the option, leaving a None
in its
place.
sourcepub fn iter(&self) -> Iter<&Archived<NonZeroI16>>
pub fn iter(&self) -> Iter<&Archived<NonZeroI16>>
Returns an iterator over the possibly-contained value.
sourcepub fn iter_mut(&mut self) -> Iter<&mut Archived<NonZeroI16>>
pub fn iter_mut(&mut self) -> Iter<&mut Archived<NonZeroI16>>
Returns an iterator over the mutable possibly-contained value.
sourcepub fn iter_seal(this: Seal<'_, Self>) -> Iter<Seal<'_, Archived<NonZeroI16>>>
pub fn iter_seal(this: Seal<'_, Self>) -> Iter<Seal<'_, Archived<NonZeroI16>>>
Returns an iterator over the sealed mutable possibly-contained value.
sourcepub fn get_or_insert(&mut self, v: NonZeroI16) -> &mut Archived<NonZeroI16>
pub fn get_or_insert(&mut self, v: NonZeroI16) -> &mut Archived<NonZeroI16>
Inserts v
into the option if it is None
, then returns a
mutable reference to the contained value.
sourcepub fn get_or_insert_with<F>(&mut self, f: F) -> &mut Archived<NonZeroI16>where
F: FnOnce() -> NonZeroI16,
pub fn get_or_insert_with<F>(&mut self, f: F) -> &mut Archived<NonZeroI16>where
F: FnOnce() -> NonZeroI16,
Inserts a value computed from f
into the option if it is
None
, then returns a mutable reference to the contained value.
sourcepub fn resolve_from_option(field: Option<NonZeroI16>, out: Place<Self>)
pub fn resolve_from_option(field: Option<NonZeroI16>, out: Place<Self>)
Resolves an ArchivedOptionNonZero
from an Option<NonZero>
.
Trait Implementations§
source§impl<__C: Fallible + ?Sized> CheckBytes<__C> for ArchivedOptionNonZeroI16
impl<__C: Fallible + ?Sized> CheckBytes<__C> for ArchivedOptionNonZeroI16
source§impl Clone for ArchivedOptionNonZeroI16
impl Clone for ArchivedOptionNonZeroI16
source§fn clone(&self) -> ArchivedOptionNonZeroI16
fn clone(&self) -> ArchivedOptionNonZeroI16
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ArchivedOptionNonZeroI16
impl Debug for ArchivedOptionNonZeroI16
source§impl<D> DeserializeWith<ArchivedOptionNonZeroI16, Option<NonZero<i16>>, D> for Niche
impl<D> DeserializeWith<ArchivedOptionNonZeroI16, Option<NonZero<i16>>, D> for Niche
source§fn deserialize_with(
field: &ArchivedOptionNonZeroI16,
_: &mut D,
) -> Result<Option<NonZeroI16>, D::Error>
fn deserialize_with( field: &ArchivedOptionNonZeroI16, _: &mut D, ) -> Result<Option<NonZeroI16>, D::Error>
Deserializes the field type
F
using the given deserializer.source§impl Hash for ArchivedOptionNonZeroI16
impl Hash for ArchivedOptionNonZeroI16
source§impl Ord for ArchivedOptionNonZeroI16
impl Ord for ArchivedOptionNonZeroI16
source§impl PartialEq for ArchivedOptionNonZeroI16
impl PartialEq for ArchivedOptionNonZeroI16
source§impl PartialOrd for ArchivedOptionNonZeroI16
impl PartialOrd for ArchivedOptionNonZeroI16
impl Copy for ArchivedOptionNonZeroI16
impl Eq for ArchivedOptionNonZeroI16
impl NoUndef for ArchivedOptionNonZeroI16
impl Portable for ArchivedOptionNonZeroI16
Auto Trait Implementations§
impl Freeze for ArchivedOptionNonZeroI16
impl RefUnwindSafe for ArchivedOptionNonZeroI16
impl Send for ArchivedOptionNonZeroI16
impl Sync for ArchivedOptionNonZeroI16
impl Unpin for ArchivedOptionNonZeroI16
impl UnwindSafe for ArchivedOptionNonZeroI16
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.