[−][src]Struct glsp::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 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]
fn deserialize<D>(d: D) -> Result<Sym, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Display for Sym
[src]
impl Eq for Sym
[src]
impl From<SymBytes> for Sym
[src]
impl FromVal for Sym
[src]
fn from_val(val: &Val) -> Result<Sym, GError>
[src]
fn from_slot(val: &Slot) -> Result<Sym, GError>
[src]
impl !GSend for Sym
[src]
impl Hash for Sym
[src]
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Sym> for Sym
[src]
impl !Send for Sym
[src]
impl Serialize for Sym
[src]
fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
[src]
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
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,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
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,
[src]
T: FromVal,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoElement<Slot> for T where
T: ToVal,
[src]
T: ToVal,
impl<T> IntoResult for T where
T: ToVal,
[src]
T: ToVal,
fn into_result(self) -> Result<Slot, GError>
[src]
impl<'a, T> MakeArg<'a> for T where
T: FromVal + MakeTemp<Temp = Slot>,
[src]
T: FromVal + MakeTemp<Temp = Slot>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<'a, T> ToSym for T where
T: Deref,
<T as Deref>::Target: ToSym,
[src]
T: Deref,
<T as Deref>::Target: ToSym,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,