Struct symbol_table::GlobalSymbol
source · pub struct GlobalSymbol(_);
Expand description
A interned string in the global symbol table.
This requires the global
feature on the crate.
GlobalSymbol
is a wrapper around Symbol
that knows to refer to a
built-in, global SymbolTable
. Strings into the global table are never freed.
This enables a lot of convience methods and trait implementations over
GlobalSymbol
(see below). In particular,
you can convert it to &'static str
,
convert From
and Into
a &str
,
and de/serialize using serde
if the serde
feature is enabled.
Implementations
Trait Implementations
sourceimpl Clone for GlobalSymbol
impl Clone for GlobalSymbol
sourcefn clone(&self) -> GlobalSymbol
fn clone(&self) -> GlobalSymbol
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 Debug for GlobalSymbol
impl Debug for GlobalSymbol
sourceimpl<'de> Deserialize<'de> for GlobalSymbol
impl<'de> Deserialize<'de> for GlobalSymbol
sourcefn 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
sourceimpl Display for GlobalSymbol
impl Display for GlobalSymbol
sourceimpl From<&String> for GlobalSymbol
impl From<&String> for GlobalSymbol
sourceimpl From<&str> for GlobalSymbol
impl From<&str> for GlobalSymbol
sourceimpl From<GlobalSymbol> for &'static str
impl From<GlobalSymbol> for &'static str
sourcefn from(sym: GlobalSymbol) -> Self
fn from(sym: GlobalSymbol) -> Self
Converts to this type from the input type.
sourceimpl From<GlobalSymbol> for NonZeroU32
impl From<GlobalSymbol> for NonZeroU32
sourcefn from(n: GlobalSymbol) -> Self
fn from(n: GlobalSymbol) -> Self
Converts to this type from the input type.
sourceimpl From<NonZeroU32> for GlobalSymbol
impl From<NonZeroU32> for GlobalSymbol
sourcefn from(n: NonZeroU32) -> Self
fn from(n: NonZeroU32) -> Self
Converts to this type from the input type.
sourceimpl From<String> for GlobalSymbol
impl From<String> for GlobalSymbol
sourceimpl FromStr for GlobalSymbol
impl FromStr for GlobalSymbol
sourceimpl Hash for GlobalSymbol
impl Hash for GlobalSymbol
sourceimpl Ord for GlobalSymbol
impl Ord for GlobalSymbol
sourcefn cmp(&self, other: &GlobalSymbol) -> Ordering
fn cmp(&self, other: &GlobalSymbol) -> 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 PartialEq<GlobalSymbol> for GlobalSymbol
impl PartialEq<GlobalSymbol> for GlobalSymbol
sourcefn eq(&self, other: &GlobalSymbol) -> bool
fn eq(&self, other: &GlobalSymbol) -> bool
sourceimpl PartialOrd<GlobalSymbol> for GlobalSymbol
impl PartialOrd<GlobalSymbol> for GlobalSymbol
sourcefn partial_cmp(&self, other: &GlobalSymbol) -> Option<Ordering>
fn partial_cmp(&self, other: &GlobalSymbol) -> 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 moresourceimpl Serialize for GlobalSymbol
impl Serialize for GlobalSymbol
impl Copy for GlobalSymbol
impl Eq for GlobalSymbol
impl StructuralEq for GlobalSymbol
impl StructuralPartialEq for GlobalSymbol
Auto Trait Implementations
impl RefUnwindSafe for GlobalSymbol
impl Send for GlobalSymbol
impl Sync for GlobalSymbol
impl Unpin for GlobalSymbol
impl UnwindSafe for GlobalSymbol
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