[][src]Trait glsp::ToSym

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

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_lib.my_sym)?;
glsp::global("sym-name")?;

Required methods

fn to_sym(&self) -> Result<Sym, GError>

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 as Deref>::Target: ToSym
[src]

Loading content...