Skip to main content

GetCallback

Trait GetCallback 

Source
pub trait GetCallback<T> {
    // Required method
    fn call() -> T;
}
Expand description

Represents callback action for cases without input for getting some data.

Required Methods§

Source

fn call() -> T

Returns value by callback’s logic.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T: Default> GetCallback<T> for ()

Source§

fn call() -> T

Implementors§