func_device

Function func_device 

Source
pub fn func_device<F, B, T>(
    forward: F,
    backward: B,
) -> impl Device<Error = Void>
where F: FnMut() -> T, B: FnMut() -> T,
Expand description

A Device which will call one function for a forward step, and another for a backward one.

See fallible_func_device() for a version which accepts fallible callbacks.