Trait InitializeFromFunction

Source
pub trait InitializeFromFunction<T> {
    // Required method
    fn initialize_from_function(f: fn() -> T) -> Self;
}
Expand description

A trait for an item that can be constructed from an initialization function

Required Methods§

Source

fn initialize_from_function(f: fn() -> T) -> Self

Create an instance of this type from an initialization function

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§