Enum rusty_value::HashablePrimitive
source · [−]pub enum HashablePrimitive {
Integer(Integer),
String(String),
OsString(OsString),
Char(char),
Bool(bool),
}
Expand description
A primitive that can be used as a hash map key
Variants
Integer(Integer)
String(String)
OsString(OsString)
Char(char)
Bool(bool)
Trait Implementations
sourceimpl Clone for HashablePrimitive
impl Clone for HashablePrimitive
sourcefn clone(&self) -> HashablePrimitive
fn clone(&self) -> HashablePrimitive
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for HashablePrimitive
impl Debug for HashablePrimitive
sourceimpl Hash for HashablePrimitive
impl Hash for HashablePrimitive
sourceimpl Ord for HashablePrimitive
impl Ord for HashablePrimitive
sourcefn cmp(&self, other: &HashablePrimitive) -> Ordering
fn cmp(&self, other: &HashablePrimitive) -> Ordering
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<HashablePrimitive> for HashablePrimitive
impl PartialEq<HashablePrimitive> for HashablePrimitive
sourcefn eq(&self, other: &HashablePrimitive) -> bool
fn eq(&self, other: &HashablePrimitive) -> bool
sourceimpl PartialOrd<HashablePrimitive> for HashablePrimitive
impl PartialOrd<HashablePrimitive> for HashablePrimitive
sourcefn partial_cmp(&self, other: &HashablePrimitive) -> Option<Ordering>
fn partial_cmp(&self, other: &HashablePrimitive) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const 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 moresourceimpl ToString for HashablePrimitive
impl ToString for HashablePrimitive
impl Eq for HashablePrimitive
impl StructuralEq for HashablePrimitive
impl StructuralPartialEq for HashablePrimitive
Auto Trait Implementations
impl RefUnwindSafe for HashablePrimitive
impl Send for HashablePrimitive
impl Sync for HashablePrimitive
impl Unpin for HashablePrimitive
impl UnwindSafe for HashablePrimitive
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