pub trait StpInterface: Send + Sync {
// Required methods
fn get_permission_list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
login_id: &'life1 str,
login_type: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, SaTokenError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn get_role_list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
login_id: &'life1 str,
login_type: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, SaTokenError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
// Provided method
fn is_disabled<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
login_id: &'life1 str,
service: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<i32>, SaTokenError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait { ... }
}Expand description
权限、角色、封禁数据回调
Required Methods§
fn get_permission_list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
login_id: &'life1 str,
login_type: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, SaTokenError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn get_role_list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
login_id: &'life1 str,
login_type: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, SaTokenError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Provided Methods§
Sourcefn is_disabled<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
login_id: &'life1 str,
service: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<i32>, SaTokenError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn is_disabled<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
login_id: &'life1 str,
service: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<i32>, SaTokenError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
返回封禁等级;None 表示未封禁
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".