Skip to main content

ComputeFunctionTrait

Trait ComputeFunctionTrait 

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

User supplied Compute function

Required Methods§

Source

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

calls the function

Source

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

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§