[−][src]Struct syntax::symbol::Symbol
A symbol is an interned or gensymed string. The use of newtype_index! means
that Option
Note that Symbol cannot be a newtype_index! directly because it implements fmt::Debug, Encodable, and Decodable in special ways.
Methods
impl Symbol
[src]
pub fn intern(string: &str) -> Symbol
[src]
Maps a string to its interned representation.
pub fn interned(self) -> Symbol
[src]
pub fn gensym(string: &str) -> Symbol
[src]
Gensyms a new usize, using the current interner.
pub fn gensymed(self) -> Symbol
[src]
pub fn as_str(self) -> LocalInternedString
[src]
pub fn as_interned_str(self) -> InternedString
[src]
pub fn as_u32(self) -> u32
[src]
Trait Implementations
impl Copy for Symbol
[src]
impl Ord for Symbol
[src]
fn cmp(&self, other: &Symbol) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl Display for Symbol
[src]
impl !Sync for Symbol
[src]
impl Decodable for Symbol
[src]
impl Eq for Symbol
[src]
impl<T> PartialEq<T> for Symbol where
T: Deref<Target = str>,
[src]
T: Deref<Target = str>,
fn eq(&self, other: &T) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=
.
impl PartialEq<Symbol> for Symbol
[src]
impl !Send for Symbol
[src]
impl Encodable for Symbol
[src]
impl Debug for Symbol
[src]
impl Clone for Symbol
[src]
fn clone(&self) -> Symbol
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialOrd<Symbol> for Symbol
[src]
fn partial_cmp(&self, other: &Symbol) -> Option<Ordering>
[src]
fn lt(&self, other: &Symbol) -> bool
[src]
fn le(&self, other: &Symbol) -> bool
[src]
fn gt(&self, other: &Symbol) -> bool
[src]
fn ge(&self, other: &Symbol) -> bool
[src]
impl Hash for Symbol
[src]
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Encodable for T where
T: UseSpecializedEncodable + ?Sized,
[src]
T: UseSpecializedEncodable + ?Sized,
impl<T> Decodable for T where
T: UseSpecializedDecodable,
[src]
T: UseSpecializedDecodable,
impl<E> SpecializationError for E
[src]
impl<T> Send for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
T: ?Sized,