Struct rkyv::niche::option_nonzero::ArchivedOptionNonZeroU32
source · pub struct ArchivedOptionNonZeroU32 { /* private fields */ }
Expand description
A niched archived Option<NonZeroU32>
Implementations§
source§impl ArchivedOptionNonZeroU32
impl ArchivedOptionNonZeroU32
sourcepub fn as_ref(&self) -> Option<&Archived<NonZeroU32>>
pub fn as_ref(&self) -> Option<&Archived<NonZeroU32>>
Converts to an Option<&Archived<NonZeroU32>>
sourcepub fn as_mut(&mut self) -> Option<&mut Archived<NonZeroU32>>
pub fn as_mut(&mut self) -> Option<&mut Archived<NonZeroU32>>
Converts to an Option<&mut Archived<NonZeroU32>>
sourcepub fn as_pin_ref(self: Pin<&Self>) -> Option<Pin<&Archived<NonZeroU32>>>
pub fn as_pin_ref(self: Pin<&Self>) -> Option<Pin<&Archived<NonZeroU32>>>
Converts from Pin<&ArchivedOptionNonZeroU32>
to Option<Pin<&Archived<NonZeroU32>>>
.
sourcepub fn as_pin_mut(
self: Pin<&mut Self>,
) -> Option<Pin<&mut Archived<NonZeroU32>>>
pub fn as_pin_mut( self: Pin<&mut Self>, ) -> Option<Pin<&mut Archived<NonZeroU32>>>
Converts from Pin<&mut ArchivedOptionNonZeroU32>
to Option<Pin<&mut Archived<NonZeroU32>>>
.
sourcepub fn iter(&self) -> Iter<'_, Archived<NonZeroU32>>
pub fn iter(&self) -> Iter<'_, Archived<NonZeroU32>>
Returns an iterator over the possibly contained value.
sourcepub fn iter_mut(&mut self) -> IterMut<'_, Archived<NonZeroU32>>
pub fn iter_mut(&mut self) -> IterMut<'_, Archived<NonZeroU32>>
Returns a mutable iterator over the possibly contained value.
sourcepub fn get_or_insert(&mut self, v: NonZeroU32) -> &mut Archived<NonZeroU32>
pub fn get_or_insert(&mut self, v: NonZeroU32) -> &mut Archived<NonZeroU32>
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: FnOnce() -> NonZeroU32>(
&mut self,
f: F,
) -> &mut Archived<NonZeroU32>
pub fn get_or_insert_with<F: FnOnce() -> NonZeroU32>( &mut self, f: F, ) -> &mut Archived<NonZeroU32>
Inserts a value computed from f
into the option if it is None
, then
returns a mutable reference to the contained value.
sourcepub unsafe fn resolve_from_option(field: Option<NonZeroU32>, out: *mut Self)
pub unsafe fn resolve_from_option(field: Option<NonZeroU32>, out: *mut Self)
Resolves an ArchivedOptionNonZero
from an Option<NonZero>
.
§Safety
pos
must be the position ofout
within the archive
Trait Implementations§
source§impl Debug for ArchivedOptionNonZeroU32
impl Debug for ArchivedOptionNonZeroU32
source§impl<D: Fallible + ?Sized> DeserializeWith<ArchivedOptionNonZeroU32, Option<NonZero<u32>>, D> for Niche
impl<D: Fallible + ?Sized> DeserializeWith<ArchivedOptionNonZeroU32, Option<NonZero<u32>>, D> for Niche
source§fn deserialize_with(
field: &ArchivedOptionNonZeroU32,
_: &mut D,
) -> Result<Option<NonZeroU32>, D::Error>
fn deserialize_with( field: &ArchivedOptionNonZeroU32, _: &mut D, ) -> Result<Option<NonZeroU32>, D::Error>
Deserializes the field type
F
using the given deserializer.source§impl<D: Fallible + ?Sized> DeserializeWith<ArchivedOptionNonZeroU32, Option<NonZero<usize>>, D> for Niche
impl<D: Fallible + ?Sized> DeserializeWith<ArchivedOptionNonZeroU32, Option<NonZero<usize>>, D> for Niche
source§fn deserialize_with(
field: &ArchivedOptionNonZeroU32,
_: &mut D,
) -> Result<Option<NonZeroUsize>, D::Error>
fn deserialize_with( field: &ArchivedOptionNonZeroU32, _: &mut D, ) -> Result<Option<NonZeroUsize>, D::Error>
Deserializes the field type
F
using the given deserializer.source§impl Hash for ArchivedOptionNonZeroU32
impl Hash for ArchivedOptionNonZeroU32
source§impl Ord for ArchivedOptionNonZeroU32
impl Ord for ArchivedOptionNonZeroU32
source§impl PartialEq for ArchivedOptionNonZeroU32
impl PartialEq for ArchivedOptionNonZeroU32
source§impl PartialOrd for ArchivedOptionNonZeroU32
impl PartialOrd for ArchivedOptionNonZeroU32
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for ArchivedOptionNonZeroU32
Auto Trait Implementations§
impl Freeze for ArchivedOptionNonZeroU32
impl RefUnwindSafe for ArchivedOptionNonZeroU32
impl Send for ArchivedOptionNonZeroU32
impl Sync for ArchivedOptionNonZeroU32
impl Unpin for ArchivedOptionNonZeroU32
impl UnwindSafe for ArchivedOptionNonZeroU32
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§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