Skip to main content

WithFactory

Trait WithFactory 

Source
pub trait WithFactory<T>: 'static {
    const FACTORY: &'static dyn Factory<Self>;
}
Expand description

Trait for trait objects that can be created from instances of a concrete type T.

Required Associated Constants§

Source

const FACTORY: &'static dyn Factory<Self>

A factory that creates trait objects of type Self, backed by concrete values of type T.

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§

Source§

impl<T, Trait> WithFactory<T> for Trait
where Trait: ArchiveTrait + ?Sized + 'static, T: DBData + Erase<Trait>,

Source§

const FACTORY: &'static dyn Factory<Self>