pub trait SystemHandler: Send + Sync {
// Required methods
fn handle_new_connection<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 AppContext,
conn: &'life2 ConnectionInfo,
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn handle_set_background<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 AppContext,
background: bool,
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn handle_set_language<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 AppContext,
language: String,
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn handle_close<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 AppContext,
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Required Methods§
Sourcefn handle_new_connection<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 AppContext,
conn: &'life2 ConnectionInfo,
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_new_connection<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 AppContext,
conn: &'life2 ConnectionInfo,
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
处理新链接
Sourcefn handle_set_background<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 AppContext,
background: bool,
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_set_background<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 AppContext,
background: bool,
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
设置后台运行
Sourcefn handle_set_language<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 AppContext,
language: String,
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_set_language<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 AppContext,
language: String,
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
设置语言
Sourcefn handle_close<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 AppContext,
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_close<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 AppContext,
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
关闭