[][src]Trait glsp::FromElement

pub trait FromElement<T>: Sealed<T> {
    pub fn from_element(item: &T) -> Result<Self, GError>;

A type which can be extracted from a deque.

Types which implement FromElement<Slot> can be taken out of an Arr or a Deque. This has a blanket implementation for any type which implements FromVal.

Types which implement FromElement<char> can be taken out of a Str. This is implemented for char and Val.

This trait is sealed. It's not possible to implement this trait for your own types. Implement FromVal instead.

Required methods

pub fn from_element(item: &T) -> Result<Self, GError>[src]

Loading content...

Implementations on Foreign Types

impl FromElement<char> for char[src]

Loading content...


impl FromElement<char> for Val[src]

impl<T> FromElement<Slot> for T where
    T: FromVal

Loading content...