Skip to main content

StaticRegistrar

Trait StaticRegistrar 

Source
pub trait StaticRegistrar: Send + Sync {
    // Required method
    fn register_static(&self, startup: &GenericStartup, router: &mut Router);
}
Expand description

Mounts static assets onto the router during bootstrap.

Receives &GenericStartup and the mutable router so assets are mounted with full access to startup state.

Required Methods§

Source

fn register_static(&self, startup: &GenericStartup, router: &mut Router)

Registers static routes into router.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§