Skip to main content

MapFunctionTrait

Trait MapFunctionTrait 

Source
pub trait MapFunctionTrait:
    Send
    + Sync
    + Debug
    + Display
    + FunctionTrait {
    // Required methods
    fn call(&self, input: &str) -> String;
    fn box_clone(&self) -> Box<dyn MapFunctionTrait>;
}
Expand description

User supplied Mapping function

Required Methods§

Source

fn call(&self, input: &str) -> String

calls the function

Source

fn box_clone(&self) -> Box<dyn MapFunctionTrait>

Creates a boxed clone of the function object (clone doesn’t work with boxed traites)

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§