StringOrFunction

Trait StringOrFunction 

pub trait StringOrFunction<A, R> {
    // Required method
    fn to_object(self) -> Object;
}
Expand description

A trait implemented by closures, Functions and strings.

Required Methods§

fn to_object(self) -> Object

Implementations on Foreign Types§

§

impl<A, R> StringOrFunction<A, R> for &str

§

fn to_object(self) -> Object

§

impl<A, R> StringOrFunction<A, R> for String

§

fn to_object(self) -> Object

Implementors§

§

impl<A, R> StringOrFunction<A, R> for Function<A, R>

§

impl<F, A, R, O> StringOrFunction<A, R> for F
where F: FnMut(A) -> O + 'static, A: Poppable, R: Pushable, O: IntoResult<R>, <O as IntoResult<R>>::Error: Error + 'static,