[−][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 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]
pub 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]
impl Hash for Sym
[src]
pub fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
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]
pub fn cmp(&self, other: &Sym) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Sym> for Sym
[src]
impl PartialOrd<Sym> for Sym
[src]
pub fn partial_cmp(&self, other: &Sym) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for Sym
[src]
pub 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]
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]
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,
pub 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,
pub fn from_element(item: &Slot) -> Result<T, GError>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoElement<Slot> for T where
T: IntoVal,
[src]
T: IntoVal,
pub fn into_element(self) -> Result<Slot, GError>
[src]
impl<T> IntoVal for T where
T: StaticMarker,
[src]
T: StaticMarker,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
pub 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>,