Skip to main content

StringOrFunction

Trait StringOrFunction 

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

A Rust closure, a Function or a string.

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

Source§

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

Implementors§

Source§

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