Trait RocketExtension

Source
pub trait RocketExtension {
    // Required methods
    fn add_with<TInjectedItem: Clone + Sync + Send + 'static, TInjectionFunction: Fn(&ServiceProvider) -> TInjectedItem + Send + Sync + 'static>(
        self,
        injection_function: TInjectionFunction,
    ) -> Self;
    fn add<TResolve: Resolve + Send + Sync + Clone + 'static>(self) -> Self;
}

Required Methods§

Source

fn add_with<TInjectedItem: Clone + Sync + Send + 'static, TInjectionFunction: Fn(&ServiceProvider) -> TInjectedItem + Send + Sync + 'static>( self, injection_function: TInjectionFunction, ) -> Self

Source

fn add<TResolve: Resolve + Send + Sync + Clone + 'static>(self) -> Self

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.

Implementations on Foreign Types§

Source§

impl RocketExtension for Rocket<Build>

Source§

fn add_with<TInjectedItem: Clone + Sync + Send + 'static, TInjectionFunction: Fn(&ServiceProvider) -> TInjectedItem + Send + Sync + 'static>( self, injection_function: TInjectionFunction, ) -> Self

Source§

fn add<TResolve: Resolve + Send + Sync + Clone + 'static>(self) -> Self

Implementors§