Skip to main content

FactoryImplementation

Trait FactoryImplementation 

Source
pub unsafe trait FactoryImplementation<'a>: 'a {
    type Factory: Factory<'a>;
    type Wrapped;

    // Required method
    fn wrapper(
        &self,
    ) -> &FactoryWrapper<<Self::Factory as Factory<'a>>::Raw, Self::Wrapped>;
}
Expand description

A types that provides a specific factory implementation.

§Safety

The wrapper returned by the wrapper function must wrap a Raw implementation that fully complies to the CLAP specification of the given Factory type, and must remain valid for the duration of the 'a lifetime.

Required Associated Types§

Source

type Factory: Factory<'a>

The Factory type this is able to provide.

Source

type Wrapped

The inner factory implementation type in the FactoryWrapper returned by wrapper

Required Methods§

Source

fn wrapper( &self, ) -> &FactoryWrapper<<Self::Factory as Factory<'a>>::Raw, Self::Wrapped>

Returns the FactoryWrapper instance this type is able to provide.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§