[][src]Struct beaver::Factory

pub struct Factory<'a, T> where
    T: Serialize + Deserialize<'a>, 
{ pub model: String, pub sequence: Cell<u16>, pub gen_func: Box<dyn Fn(&mut T, u16)>, pub _maker: PhantomData<&'a T>, }

Fields

model: Stringsequence: Cell<u16>gen_func: Box<dyn Fn(&mut T, u16)>_maker: PhantomData<&'a T>

Implementations

impl<'a, T> Factory<'a, T> where
    T: Serialize + Deserialize<'a>, 
[src]

pub fn build<O>(&'a self, f: O) -> T where
    O: Fn(&mut T), 
[src]

Builds a struct from Factory.

pub fn build_list<O>(&'a self, number: u16, f: O) -> Vec<T> where
    O: Fn(&mut T), 
[src]

Builds a vector of structs from Factory.

Auto Trait Implementations

impl<'a, T> !RefUnwindSafe for Factory<'a, T>

impl<'a, T> !Send for Factory<'a, T>

impl<'a, T> !Sync for Factory<'a, T>

impl<'a, T> Unpin for Factory<'a, T>

impl<'a, T> !UnwindSafe for Factory<'a, T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.