pub enum SummaryNullness {
NonNull,
MaybeNull,
AlwaysNull,
}Expand description
Nullness classification for a pointer value.
Variants§
Implementations§
Source§impl SummaryNullness
impl SummaryNullness
Sourcepub fn from_spec_nullness(n: &Nullness) -> Self
pub fn from_spec_nullness(n: &Nullness) -> Self
Convert from the spec system’s Nullness to SummaryNullness.
The spec system has four variants (NotNull, MaybeNull,
RequiredNonnull, Nullable). For summary purposes, NotNull and
RequiredNonnull both map to NonNull, and Nullable maps to
MaybeNull.
Sourcepub fn to_spec_nullness(self) -> Nullness
pub fn to_spec_nullness(self) -> Nullness
Convert to the spec system’s Nullness.
This is lossy: AlwaysNull has no direct spec equivalent and maps to
MaybeNull (the conservative choice).
Trait Implementations§
Source§impl Clone for SummaryNullness
impl Clone for SummaryNullness
Source§fn clone(&self) -> SummaryNullness
fn clone(&self) -> SummaryNullness
Returns a duplicate 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 SummaryNullness
impl Debug for SummaryNullness
Source§impl<'de> Deserialize<'de> for SummaryNullness
impl<'de> Deserialize<'de> for SummaryNullness
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for SummaryNullness
impl Hash for SummaryNullness
Source§impl Ord for SummaryNullness
impl Ord for SummaryNullness
Source§fn cmp(&self, other: &SummaryNullness) -> Ordering
fn cmp(&self, other: &SummaryNullness) -> Ordering
1.21.0 · Source§fn 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
Source§impl PartialEq for SummaryNullness
impl PartialEq for SummaryNullness
Source§impl PartialOrd for SummaryNullness
impl PartialOrd for SummaryNullness
Source§impl Serialize for SummaryNullness
impl Serialize for SummaryNullness
impl Copy for SummaryNullness
impl Eq for SummaryNullness
impl StructuralPartialEq for SummaryNullness
Auto Trait Implementations§
impl Freeze for SummaryNullness
impl RefUnwindSafe for SummaryNullness
impl Send for SummaryNullness
impl Sync for SummaryNullness
impl Unpin for SummaryNullness
impl UnsafeUnpin for SummaryNullness
impl UnwindSafe for SummaryNullness
Blanket Implementations§
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.