[][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.

Implementations

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 is_representable(&self) -> bool[src]

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

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

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

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

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

This method is only present when the "serde" feature is enabled.

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

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

This method is only present when the "serde" feature is enabled.

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 Hash for Sym[src]

impl<'a> IntoVal for &'a Sym[src]

impl IntoVal for Sym[src]

impl<'a> IntoVal for &'a mut Sym[src]

impl Ord for Sym[src]

impl PartialEq<Sym> for Sym[src]

impl PartialOrd<Sym> for Sym[src]

impl Serialize for Sym[src]

impl StructuralEq for Sym[src]

impl StructuralPartialEq for Sym[src]

impl ToSym for Sym[src]

Auto Trait Implementations

impl RefUnwindSafe for Sym[src]

impl !Send for Sym[src]

impl !Sync for Sym[src]

impl Unpin for Sym[src]

impl UnwindSafe for Sym[src]

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T> Erased for T

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

impl<T> FromElement<Slot> for T where
    T: FromVal
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoElement<Slot> for T where
    T: IntoVal
[src]

impl<T> IntoVal for T where
    T: StaticMarker, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.