pub struct AuthCommandHandler<T>(pub T);Expand description
认证命令处理器
Tuple Fields§
§0: TImplementations§
Source§impl<T> AuthCommandHandler<T>
impl<T> AuthCommandHandler<T>
Trait Implementations§
Source§impl<T: AuthHandler + Send + Sync> AuthHandler for AuthCommandHandler<T>
impl<T: AuthHandler + Send + Sync> AuthHandler for AuthCommandHandler<T>
Source§fn handle_login<'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_login<'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,
处理登录请求
Source§fn handle_logout<'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_logout<'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,
处理登出请求
Source§impl<T: AuthHandler + Send + Sync> CommandHandler for AuthCommandHandler<T>
impl<T: AuthHandler + Send + Sync> CommandHandler for AuthCommandHandler<T>
Source§fn handle_command<'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_command<'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,
处理命令
Source§fn supported_commands(&self) -> Vec<Command>
fn supported_commands(&self) -> Vec<Command>
获取支持的命令列表
Source§fn supports_command(&self, command: Command) -> bool
fn supports_command(&self, command: Command) -> bool
检查是否支持某个命令
Auto Trait Implementations§
impl<T> Freeze for AuthCommandHandler<T>where
T: Freeze,
impl<T> RefUnwindSafe for AuthCommandHandler<T>where
T: RefUnwindSafe,
impl<T> Send for AuthCommandHandler<T>where
T: Send,
impl<T> Sync for AuthCommandHandler<T>where
T: Sync,
impl<T> Unpin for AuthCommandHandler<T>where
T: Unpin,
impl<T> UnwindSafe for AuthCommandHandler<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more