[][src]Trait glsp::ToSym

pub trait ToSym {
    pub 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:


Required methods

pub fn to_sym(&self) -> Result<Sym, GError>[src]

Loading content...

Implementations on Foreign Types

impl<'a> ToSym for str[src]

Loading content...


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

Loading content...