Skip to main content

StringOrFunction

Trait StringOrFunction 

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

A trait implemented by closures, Functions and strings.

Required Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

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

Source§

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

Implementors§

Source§

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

Source§

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,