pub trait AppCreator<ServerT: Server>:
DerefMut<Target = AppCreatorBase<ServerT>>
+ Send
+ Clone
+ 'static {
type ContextT: Default + Send + Clone + 'static;
// Required methods
fn new(config: &Config) -> Result<Self>;
fn into_app(
self,
handle: &Handle<ServerT>,
context: &Self::ContextT,
generation: usize,
) -> ServerT::AppT;
}Required Associated Types§
Sourcetype ContextT: Default + Send + Clone + 'static
type ContextT: Default + Send + Clone + 'static
When Apps are created a new AppCreator::ContextT is created,
and a reference to it is passed to AppCreator::into_app.
Required Methods§
Sourcefn new(config: &Config) -> Result<Self>
fn new(config: &Config) -> Result<Self>
Creates a new instance of this AppCreator based on the given configuration.
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.