Init

Trait Init 

Source
pub trait Init<T, P> {
    // Required method
    fn init(&self, obj: &Extended<'_, T>) -> P;
}
Expand description

Defines how a Property is initialized when first accessed.

Required Methods§

Source

fn init(&self, obj: &Extended<'_, T>) -> P

Creates the initial value for the property on the given object.

Implementors§

Source§

impl<'a, T, P> Init<T, P> for DynInit<'a, T, P>

Source§

impl<T, P, F: Fn(&Extended<'_, T>) -> P> Init<T, P> for FnInit<F>

Source§

impl<T, P: Clone> Init<T, P> for ConstInit<P>

Source§

impl<T, P: Default> Init<T, P> for DefaultInit