[][src]Trait glsp_engine::ToSym

pub trait ToSym {
    pub fn to_sym(&self) -> GResult<Sym>;
}

A type which can be converted to a Sym.

This is mostly used to make APIs more ergonomic. For example, the argument to glsp::global is a generic S: ToSym, which means that it can receive either a symbol or a string:

glsp::global(my_rglobalrary.my_sym)?;
glsp::global("sym-name")?;

Required methods

pub fn to_sym(&self) -> GResult<Sym>[src]

Loading content...

Implementations on Foreign Types

impl<'a> ToSym for str[src]

Loading content...

Implementors

impl ToSym for Sym[src]

impl<'a> ToSym for Str[src]

impl<'a, T> ToSym for T where
    T: Deref,
    T::Target: ToSym
[src]

Loading content...