Enum microkelvin::MaxKey
source · [−]#[repr(u8)]
pub enum MaxKey<K> {
NegativeInfinity,
Maximum(K),
}
Expand description
The maximum value of a collection
Variants
NegativeInfinity
Identity of max, everything else is larger
Maximum(K)
Actual max value
Trait Implementations
sourceimpl<K> Archive for MaxKey<K> where
K: Primitive,
K: Archive,
impl<K> Archive for MaxKey<K> where
K: Primitive,
K: Archive,
sourceimpl<__C: ?Sized, K> CheckBytes<__C> for MaxKey<K> where
K: CheckBytes<__C>,
impl<__C: ?Sized, K> CheckBytes<__C> for MaxKey<K> where
K: CheckBytes<__C>,
type Error = EnumCheckError<u8>
type Error = EnumCheckError<u8>
The error that may result from checking the type.
sourceunsafe fn check_bytes<'__bytecheck>(
value: *const Self,
context: &mut __C
) -> Result<&'__bytecheck Self, Self::Error>
unsafe fn check_bytes<'__bytecheck>(
value: *const Self,
context: &mut __C
) -> Result<&'__bytecheck Self, Self::Error>
Checks whether the given pointer points to a valid value within the given context. Read more
sourceimpl<__D: Fallible + ?Sized, K> Deserialize<MaxKey<K>, __D> for Archived<MaxKey<K>> where
K: Primitive,
K: Archive,
Archived<K>: Deserialize<K, __D>,
impl<__D: Fallible + ?Sized, K> Deserialize<MaxKey<K>, __D> for Archived<MaxKey<K>> where
K: Primitive,
K: Archive,
Archived<K>: Deserialize<K, __D>,
sourceimpl<K> Ord for MaxKey<K> where
K: Ord,
impl<K> Ord for MaxKey<K> where
K: Ord,
sourceimpl<K> PartialOrd<K> for MaxKey<K> where
K: PartialEq<K>,
K: PartialOrd,
impl<K> PartialOrd<K> for MaxKey<K> where
K: PartialEq<K>,
K: PartialOrd,
sourcefn partial_cmp(&self, other: &K) -> Option<Ordering>
fn partial_cmp(&self, other: &K) -> 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
sourceimpl<K> PartialOrd<MaxKey<K>> for MaxKey<K> where
K: PartialOrd,
impl<K> PartialOrd<MaxKey<K>> for MaxKey<K> where
K: PartialOrd,
sourcefn partial_cmp(&self, other: &MaxKey<K>) -> Option<Ordering>
fn partial_cmp(&self, other: &MaxKey<K>) -> 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
sourceimpl<__S: Fallible + ?Sized, K> Serialize<__S> for MaxKey<K> where
K: Primitive,
K: Serialize<__S>,
impl<__S: Fallible + ?Sized, K> Serialize<__S> for MaxKey<K> where
K: Primitive,
K: Serialize<__S>,
impl<K: Eq> Eq for MaxKey<K>
impl<K> StructuralEq for MaxKey<K>
impl<K> StructuralPartialEq for MaxKey<K>
Auto Trait Implementations
impl<K> RefUnwindSafe for MaxKey<K> where
K: RefUnwindSafe,
impl<K> Send for MaxKey<K> where
K: Send,
impl<K> Sync for MaxKey<K> where
K: Sync,
impl<K> Unpin for MaxKey<K> where
K: Unpin,
impl<K> UnwindSafe for MaxKey<K> where
K: UnwindSafe,
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(
&<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.
sourceimpl<T> ArchiveUnsized for T where
T: Archive,
impl<T> ArchiveUnsized for T where
T: Archive,
type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
The archived counterpart of this type. Unlike Archive
, it may be unsized. Read more
type MetadataResolver = ()
type MetadataResolver = ()
The resolver for the metadata of this type. Read more
sourceunsafe fn resolve_metadata(
&self,
usize,
<T as ArchiveUnsized>::MetadataResolver,
*mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
)
unsafe fn resolve_metadata(
&self,
usize,
<T as ArchiveUnsized>::MetadataResolver,
*mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
)
Creates the archived version of the metadata for this value at the given position and writes it to the given output. Read more
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
sourceimpl<T, S> SerializeUnsized<S> for T where
T: Serialize<S>,
S: Serializer + ?Sized,
impl<T, S> SerializeUnsized<S> for T where
T: Serialize<S>,
S: Serializer + ?Sized,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more