Skip to main content

Callable

Trait Callable 

Source
pub trait Callable<In, Out = ()>
where In: 'static, Out: 'static,
{ // Required method fn run(&self, input: In) -> Out; }
Expand description

A wrapper trait for calling callbacks.

Required Methods§

Source

fn run(&self, input: In) -> Out

calls the callback with the specified argument.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<In, Out> Callable<In, Out> for Callback<In, Out>

Source§

impl<In, Out> Callable<In, Out> for UnsyncCallback<In, Out>
where In: 'static, Out: 'static,