Enum nstd_sys::core::optional::NSTDOptional
source · #[repr(C)]
pub enum NSTDOptional<T> {
None,
Some(T),
}Available on crate feature
nstd_core only.Expand description
Represents an optional (possibly uninitialized) value.
Variants
None
The uninitialized variant.
Some(T)
The initialized variant.
Trait Implementations
sourceimpl<T: Clone> Clone for NSTDOptional<T>
impl<T: Clone> Clone for NSTDOptional<T>
sourcefn clone(&self) -> NSTDOptional<T>
fn clone(&self) -> NSTDOptional<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl<T: Debug> Debug for NSTDOptional<T>
impl<T: Debug> Debug for NSTDOptional<T>
sourceimpl<T> Default for NSTDOptional<T>
impl<T> Default for NSTDOptional<T>
sourcefn default() -> NSTDOptional<T>
fn default() -> NSTDOptional<T>
Returns the “default value” for a type. Read more
sourceimpl<T: Ord> Ord for NSTDOptional<T>
impl<T: Ord> Ord for NSTDOptional<T>
sourcefn cmp(&self, other: &NSTDOptional<T>) -> Ordering
fn cmp(&self, other: &NSTDOptional<T>) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<T: PartialEq> PartialEq<NSTDOptional<T>> for NSTDOptional<T>
impl<T: PartialEq> PartialEq<NSTDOptional<T>> for NSTDOptional<T>
sourcefn eq(&self, other: &NSTDOptional<T>) -> bool
fn eq(&self, other: &NSTDOptional<T>) -> bool
sourceimpl<T: PartialOrd> PartialOrd<NSTDOptional<T>> for NSTDOptional<T>
impl<T: PartialOrd> PartialOrd<NSTDOptional<T>> for NSTDOptional<T>
sourcefn partial_cmp(&self, other: &NSTDOptional<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &NSTDOptional<T>) -> Option<Ordering>
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 moreimpl<T: Copy> Copy for NSTDOptional<T>
impl<T: Eq> Eq for NSTDOptional<T>
impl<T> StructuralEq for NSTDOptional<T>
impl<T> StructuralPartialEq for NSTDOptional<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for NSTDOptional<T>where
T: RefUnwindSafe,
impl<T> Send for NSTDOptional<T>where
T: Send,
impl<T> Sync for NSTDOptional<T>where
T: Sync,
impl<T> Unpin for NSTDOptional<T>where
T: Unpin,
impl<T> UnwindSafe for NSTDOptional<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more