[][src]Struct glsp::Sym

pub struct Sym(_);

The sym primitive type.

Symbols are represented by a small Copy type (a 32-bit integer id).

To convert a string into a symbol, you should usually call glsp::sym.


impl Sym[src]

pub fn name(&self) -> Rc<str>[src]

Returns the name of the symbol.

For gensyms, the name is the same as its printed representation, e.g. #<gs:tag:8>.

pub fn is_gensym(&self) -> bool[src]

Returns true if this symbol is a gensym.

Gensyms are constructed using glsp::gensym or glsp::gensym_with_tag.

impl Sym[src]

pub fn check_representability(&self) -> Result<(), &'static str>[src]

Returns Ok if this symbol can be losslessly converted to text.

pub fn check_serializability(&self) -> Result<(), &'static str>[src]

Returns Ok if this symbol can be serialized and deserialized using Serde.

Trait Implementations

impl Clone for Sym[src]

impl Copy for Sym[src]

impl Debug for Sym[src]

impl<'de> Deserialize<'de> for Sym[src]

impl Display for Sym[src]

impl Eq for Sym[src]

impl From<SymBytes> for Sym[src]

impl FromVal for Sym[src]

impl !GSend for Sym[src]

impl Hash for Sym[src]

impl PartialEq<Sym> for Sym[src]

impl !Send for Sym[src]

impl Serialize for Sym[src]

impl StructuralEq for Sym[src]

impl StructuralPartialEq for Sym[src]

impl ToSym for Sym[src]

impl ToVal for Sym[src]

Auto Trait Implementations

impl GStore for Sym

impl RefUnwindSafe for Sym

impl Sync for Sym

impl Unpin for Sym

impl UnwindSafe for Sym

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T> FromElement<Slot> for T where
    T: FromVal

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> IntoElement<Slot> for T where
    T: ToVal

impl<T> IntoResult for T where
    T: ToVal

impl<'a, T> MakeArg<'a> for T where
    T: FromVal + MakeTemp<Temp = Slot>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized

impl<'a, T> ToSym for T where
    T: Deref,
    <T as Deref>::Target: ToSym

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.