Struct rkyv::niche::option_nonzero::ArchivedOptionNonZeroU16
source · [−]#[repr(transparent)]pub struct ArchivedOptionNonZeroU16 { /* private fields */ }
Expand description
A niched archived Option<NonZeroU16>
Implementations
sourceimpl ArchivedOptionNonZeroU16
impl ArchivedOptionNonZeroU16
sourcepub fn as_ref(&self) -> Option<&Archived<NonZeroU16>>
pub fn as_ref(&self) -> Option<&Archived<NonZeroU16>>
Converts to an Option<&Archived<NonZeroU16>>
sourcepub fn as_mut(&mut self) -> Option<&mut Archived<NonZeroU16>>
pub fn as_mut(&mut self) -> Option<&mut Archived<NonZeroU16>>
Converts to an Option<&mut Archived<NonZeroU16>>
sourcepub fn as_pin_ref(self: Pin<&Self>) -> Option<Pin<&Archived<NonZeroU16>>>
pub fn as_pin_ref(self: Pin<&Self>) -> Option<Pin<&Archived<NonZeroU16>>>
Converts from Pin<&ArchivedOptionNonZeroU16>
to Option<Pin<&Archived<NonZeroU16>>>
.
sourcepub fn as_pin_mut(
self: Pin<&mut Self>
) -> Option<Pin<&mut Archived<NonZeroU16>>>
pub fn as_pin_mut(
self: Pin<&mut Self>
) -> Option<Pin<&mut Archived<NonZeroU16>>>
Converts from Pin<&mut ArchivedOptionNonZeroU16>
to Option<Pin<&mut Archived<NonZeroU16>>>
.
sourcepub fn iter(&self) -> Iter<'_, Archived<NonZeroU16>>
pub fn iter(&self) -> Iter<'_, Archived<NonZeroU16>>
Returns an iterator over the possibly contained value.
sourcepub fn iter_mut(&mut self) -> IterMut<'_, Archived<NonZeroU16>>
pub fn iter_mut(&mut self) -> IterMut<'_, Archived<NonZeroU16>>
Returns a mutable iterator over the possibly contained value.
sourcepub fn get_or_insert(&mut self, v: NonZeroU16) -> &mut Archived<NonZeroU16>
pub fn get_or_insert(&mut self, v: NonZeroU16) -> &mut Archived<NonZeroU16>
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() -> NonZeroU16>(
&mut self,
f: F
) -> &mut Archived<NonZeroU16>
pub fn get_or_insert_with<F: FnOnce() -> NonZeroU16>(
&mut self,
f: F
) -> &mut Archived<NonZeroU16>
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<NonZeroU16>, out: *mut Self)
pub unsafe fn resolve_from_option(field: Option<NonZeroU16>, out: *mut Self)
Resolves an ArchivedOptionNonZero
from an Option<NonZero>
.
Safety
pos
must be the position ofout
within the archive
Trait Implementations
sourceimpl Debug for ArchivedOptionNonZeroU16
impl Debug for ArchivedOptionNonZeroU16
sourceimpl<D: Fallible + ?Sized> DeserializeWith<ArchivedOptionNonZeroU16, Option<NonZeroU16>, D> for Niche
impl<D: Fallible + ?Sized> DeserializeWith<ArchivedOptionNonZeroU16, Option<NonZeroU16>, D> for Niche
sourcefn deserialize_with(
field: &ArchivedOptionNonZeroU16,
_: &mut D
) -> Result<Option<NonZeroU16>, D::Error>
fn deserialize_with(
field: &ArchivedOptionNonZeroU16,
_: &mut D
) -> Result<Option<NonZeroU16>, D::Error>
Deserializes the field type F
using the given deserializer.
sourceimpl Hash for ArchivedOptionNonZeroU16
impl Hash for ArchivedOptionNonZeroU16
sourceimpl Ord for ArchivedOptionNonZeroU16
impl Ord for ArchivedOptionNonZeroU16
sourceimpl PartialOrd<ArchivedOptionNonZeroU16> for ArchivedOptionNonZeroU16
impl PartialOrd<ArchivedOptionNonZeroU16> for ArchivedOptionNonZeroU16
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
impl Eq for ArchivedOptionNonZeroU16
Auto Trait Implementations
impl RefUnwindSafe for ArchivedOptionNonZeroU16
impl Send for ArchivedOptionNonZeroU16
impl Sync for ArchivedOptionNonZeroU16
impl Unpin for ArchivedOptionNonZeroU16
impl UnwindSafe for ArchivedOptionNonZeroU16
Blanket Implementations
sourceimpl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
sourcefn pointer_metadata(_: &Self::ArchivedMetadata) -> <Self as Pointee>::Metadata
fn pointer_metadata(_: &Self::ArchivedMetadata) -> <Self as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more