Struct rkyv::niche::option_nonzero::ArchivedOptionNonZeroI128
source · [−]#[repr(transparent)]pub struct ArchivedOptionNonZeroI128 { /* private fields */ }
Expand description
A niched archived Option<NonZeroI128>
Implementations
sourceimpl ArchivedOptionNonZeroI128
impl ArchivedOptionNonZeroI128
sourcepub fn as_ref(&self) -> Option<&Archived<NonZeroI128>>
pub fn as_ref(&self) -> Option<&Archived<NonZeroI128>>
Converts to an Option<&Archived<NonZeroI128>>
sourcepub fn as_mut(&mut self) -> Option<&mut Archived<NonZeroI128>>
pub fn as_mut(&mut self) -> Option<&mut Archived<NonZeroI128>>
Converts to an Option<&mut Archived<NonZeroI128>>
sourcepub fn as_pin_ref(self: Pin<&Self>) -> Option<Pin<&Archived<NonZeroI128>>>
pub fn as_pin_ref(self: Pin<&Self>) -> Option<Pin<&Archived<NonZeroI128>>>
Converts from Pin<&ArchivedOptionNonZeroI128>
to Option<Pin<&Archived<NonZeroI128>>>
.
sourcepub fn as_pin_mut(
self: Pin<&mut Self>
) -> Option<Pin<&mut Archived<NonZeroI128>>>
pub fn as_pin_mut(
self: Pin<&mut Self>
) -> Option<Pin<&mut Archived<NonZeroI128>>>
Converts from Pin<&mut ArchivedOptionNonZeroI128>
to Option<Pin<&mut Archived<NonZeroI128>>>
.
sourcepub fn iter(&self) -> Iter<'_, Archived<NonZeroI128>>
pub fn iter(&self) -> Iter<'_, Archived<NonZeroI128>>
Returns an iterator over the possibly contained value.
sourcepub fn iter_mut(&mut self) -> IterMut<'_, Archived<NonZeroI128>>
pub fn iter_mut(&mut self) -> IterMut<'_, Archived<NonZeroI128>>
Returns a mutable iterator over the possibly contained value.
sourcepub fn get_or_insert(&mut self, v: NonZeroI128) -> &mut Archived<NonZeroI128>
pub fn get_or_insert(&mut self, v: NonZeroI128) -> &mut Archived<NonZeroI128>
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() -> NonZeroI128>(
&mut self,
f: F
) -> &mut Archived<NonZeroI128>
pub fn get_or_insert_with<F: FnOnce() -> NonZeroI128>(
&mut self,
f: F
) -> &mut Archived<NonZeroI128>
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<NonZeroI128>, out: *mut Self)
pub unsafe fn resolve_from_option(field: Option<NonZeroI128>, 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 ArchivedOptionNonZeroI128
impl Debug for ArchivedOptionNonZeroI128
sourceimpl<D: Fallible + ?Sized> DeserializeWith<ArchivedOptionNonZeroI128, Option<NonZeroI128>, D> for Niche
impl<D: Fallible + ?Sized> DeserializeWith<ArchivedOptionNonZeroI128, Option<NonZeroI128>, D> for Niche
sourcefn deserialize_with(
field: &ArchivedOptionNonZeroI128,
_: &mut D
) -> Result<Option<NonZeroI128>, D::Error>
fn deserialize_with(
field: &ArchivedOptionNonZeroI128,
_: &mut D
) -> Result<Option<NonZeroI128>, D::Error>
Deserializes the field type F
using the given deserializer.
sourceimpl Hash for ArchivedOptionNonZeroI128
impl Hash for ArchivedOptionNonZeroI128
sourceimpl Ord for ArchivedOptionNonZeroI128
impl Ord for ArchivedOptionNonZeroI128
sourceimpl PartialOrd<ArchivedOptionNonZeroI128> for ArchivedOptionNonZeroI128
impl PartialOrd<ArchivedOptionNonZeroI128> for ArchivedOptionNonZeroI128
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 ArchivedOptionNonZeroI128
Auto Trait Implementations
impl RefUnwindSafe for ArchivedOptionNonZeroI128
impl Send for ArchivedOptionNonZeroI128
impl Sync for ArchivedOptionNonZeroI128
impl Unpin for ArchivedOptionNonZeroI128
impl UnwindSafe for ArchivedOptionNonZeroI128
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