pub trait Application: Send + Sync {
// Required methods
fn init_middleware<'life0, 'life1, 'async_trait>(
&'life0 mut self,
properties: &'life1 ApplicationProperties,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn application_router<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ctx: &'life1 mut ApplicationContext,
) -> Pin<Box<dyn Future<Output = (OpenRouter, PrivateRouter)> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn banner_show() { ... }
fn init_message_source<'life0, 'life1, 'async_trait, T>(
&'life0 mut self,
application_properties: &'life1 NextProperties,
) -> Pin<Box<dyn Future<Output = HashMap<String, HashMap<String, String>>> + Send + 'async_trait>>
where T: 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn user_permission_resource(&self) -> Option<UserPermissionResource> { ... }
fn init_logger(&self, application_properties: &ApplicationProperties) { ... }
fn autowire_properties<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
ctx: &'life1 mut ApplicationContext,
application_properties: &'life2 ApplicationProperties,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn register_singleton<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 mut ApplicationContext,
application_properties: &'life2 ApplicationProperties,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn init_infrastructure<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 mut ApplicationContext,
_application_properties: &'life2 ApplicationProperties,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn bind_tcp_server<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
ctx: &'life1 mut ApplicationContext,
application_properties: &'life2 ApplicationProperties,
time: Instant,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn run<'async_trait>( ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: Application + Default + 'async_trait { ... }
}
Required Methods§
Sourcefn init_middleware<'life0, 'life1, 'async_trait>(
&'life0 mut self,
properties: &'life1 ApplicationProperties,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn init_middleware<'life0, 'life1, 'async_trait>(
&'life0 mut self,
properties: &'life1 ApplicationProperties,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
initialize the middleware.
fn application_router<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ctx: &'life1 mut ApplicationContext,
) -> Pin<Box<dyn Future<Output = (OpenRouter, PrivateRouter)> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Provided Methods§
show the banner of the application.
Sourcefn init_message_source<'life0, 'life1, 'async_trait, T>(
&'life0 mut self,
application_properties: &'life1 NextProperties,
) -> Pin<Box<dyn Future<Output = HashMap<String, HashMap<String, String>>> + Send + 'async_trait>>where
T: 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn init_message_source<'life0, 'life1, 'async_trait, T>(
&'life0 mut self,
application_properties: &'life1 NextProperties,
) -> Pin<Box<dyn Future<Output = HashMap<String, HashMap<String, String>>> + Send + 'async_trait>>where
T: 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
initialize the message source.
fn user_permission_resource(&self) -> Option<UserPermissionResource>
Sourcefn init_logger(&self, application_properties: &ApplicationProperties)
fn init_logger(&self, application_properties: &ApplicationProperties)
initialize the logger.
Sourcefn autowire_properties<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
ctx: &'life1 mut ApplicationContext,
application_properties: &'life2 ApplicationProperties,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn autowire_properties<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
ctx: &'life1 mut ApplicationContext,
application_properties: &'life2 ApplicationProperties,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Autowire properties
Sourcefn register_singleton<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 mut ApplicationContext,
application_properties: &'life2 ApplicationProperties,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn register_singleton<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 mut ApplicationContext,
application_properties: &'life2 ApplicationProperties,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Register application singleton
Sourcefn init_infrastructure<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 mut ApplicationContext,
_application_properties: &'life2 ApplicationProperties,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn init_infrastructure<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 mut ApplicationContext,
_application_properties: &'life2 ApplicationProperties,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
initialize the application infrastructure
Sourcefn bind_tcp_server<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
ctx: &'life1 mut ApplicationContext,
application_properties: &'life2 ApplicationProperties,
time: Instant,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn bind_tcp_server<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
ctx: &'life1 mut ApplicationContext,
application_properties: &'life2 ApplicationProperties,
time: Instant,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
bind tcp server.
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.