Struct cov::intern::Symbol [−][src]
pub struct Symbol(_);
A handle to an interned string in an Interner
.
Symbol
is a wrapper of usize
, and can be cheaply copied and compared. Symbol
s are produced by calling
Interner::intern()
.
Trait Implementations
impl Copy for Symbol
[src]
impl Copy for Symbol
impl Clone for Symbol
[src]
impl Clone for Symbol
fn clone(&self) -> Symbol
[src]
fn clone(&self) -> Symbol
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for Symbol
[src]
impl PartialEq for Symbol
fn eq(&self, other: &Symbol) -> bool
[src]
fn eq(&self, other: &Symbol) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Symbol) -> bool
[src]
fn ne(&self, other: &Symbol) -> bool
This method tests for !=
.
impl Eq for Symbol
[src]
impl Eq for Symbol
impl PartialOrd for Symbol
[src]
impl PartialOrd for Symbol
fn partial_cmp(&self, other: &Symbol) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Symbol) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Symbol) -> bool
[src]
fn lt(&self, other: &Symbol) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Symbol) -> bool
[src]
fn le(&self, other: &Symbol) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Symbol) -> bool
[src]
fn gt(&self, other: &Symbol) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Symbol) -> bool
[src]
fn ge(&self, other: &Symbol) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for Symbol
[src]
impl Ord for Symbol
fn cmp(&self, other: &Symbol) -> Ordering
[src]
fn cmp(&self, other: &Symbol) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Hash for Symbol
[src]
impl Hash for Symbol
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Default for Symbol
[src]
impl Default for Symbol
impl Debug for Symbol
[src]
impl Debug for Symbol
fn fmt(&self, fmt: &mut Formatter) -> Result
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl ToPrimitive for Symbol
[src]
impl ToPrimitive for Symbol
fn to_i64(&self) -> Option<i64>
[src]
fn to_i64(&self) -> Option<i64>
Converts the value of self
to an i64
.
fn to_u64(&self) -> Option<u64>
[src]
fn to_u64(&self) -> Option<u64>
Converts the value of self
to an u64
.
fn to_usize(&self) -> Option<usize>
[src]
fn to_usize(&self) -> Option<usize>
Converts the value of self
to a usize
.
fn to_isize(&self) -> Option<isize>
[src]
fn to_isize(&self) -> Option<isize>
Converts the value of self
to an isize
.
fn to_i8(&self) -> Option<i8>
[src]
fn to_i8(&self) -> Option<i8>
Converts the value of self
to an i8
.
fn to_i16(&self) -> Option<i16>
[src]
fn to_i16(&self) -> Option<i16>
Converts the value of self
to an i16
.
fn to_i32(&self) -> Option<i32>
[src]
fn to_i32(&self) -> Option<i32>
Converts the value of self
to an i32
.
fn to_i128(&self) -> Option<i128>
[src]
fn to_i128(&self) -> Option<i128>
Converts the value of self
to an i128
. Read more
fn to_u8(&self) -> Option<u8>
[src]
fn to_u8(&self) -> Option<u8>
Converts the value of self
to an u8
.
fn to_u16(&self) -> Option<u16>
[src]
fn to_u16(&self) -> Option<u16>
Converts the value of self
to an u16
.
fn to_u32(&self) -> Option<u32>
[src]
fn to_u32(&self) -> Option<u32>
Converts the value of self
to an u32
.
fn to_u128(&self) -> Option<u128>
[src]
fn to_u128(&self) -> Option<u128>
Converts the value of self
to an u128
. Read more
fn to_f32(&self) -> Option<f32>
[src]
fn to_f32(&self) -> Option<f32>
Converts the value of self
to an f32
.
fn to_f64(&self) -> Option<f64>
[src]
fn to_f64(&self) -> Option<f64>
Converts the value of self
to an f64
.
impl From<Symbol> for usize
[src]
impl From<Symbol> for usize
impl Index<Symbol> for Interner
[src]
impl Index<Symbol> for Interner
type Output = str
The returned type after indexing.
fn index(&self, index: Symbol) -> &str
[src]
fn index(&self, index: Symbol) -> &str
Performs the indexing (container[index]
) operation.
impl SerializeWithInterner for Symbol
[src]
impl SerializeWithInterner for Symbol
fn serialize_with_interner<S: Serializer>(
&self,
serializer: S,
interner: &Interner
) -> Result<S::Ok, S::Error>
[src]
fn serialize_with_interner<S: Serializer>(
&self,
serializer: S,
interner: &Interner
) -> Result<S::Ok, S::Error>
Serializes this value with help from an [Interner
] that writes [Symbol
]s as strings. Read more
fn with_interner<'si>(
&self,
interner: &'si Interner
) -> WithInterner<'si, &Self>
[src]
fn with_interner<'si>(
&self,
interner: &'si Interner
) -> WithInterner<'si, &Self>
Adorns this object with a string interner. Read more