pub struct DistributedOnlineStore { /* private fields */ }Expand description
Shared store via SaTokenDao. 经 SaTokenDao 的共享存储。
Implementations§
Trait Implementations§
Source§impl Debug for DistributedOnlineStore
impl Debug for DistributedOnlineStore
Source§impl OnlineStore for DistributedOnlineStore
impl OnlineStore for DistributedOnlineStore
Source§fn mark_online<'life0, 'async_trait>(
&'life0 self,
user: OnlineUser,
) -> Pin<Box<dyn Future<Output = SaTokenResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn mark_online<'life0, 'async_trait>(
&'life0 self,
user: OnlineUser,
) -> Pin<Box<dyn Future<Output = SaTokenResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Mark a user connection online | 标记用户连接在线
Source§fn mark_offline<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
login_type: &'life1 str,
login_id: &'life2 str,
token: &'life3 str,
) -> Pin<Box<dyn Future<Output = SaTokenResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn mark_offline<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
login_type: &'life1 str,
login_id: &'life2 str,
token: &'life3 str,
) -> Pin<Box<dyn Future<Output = SaTokenResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
mark_offline — mark offline | mark_offlineSource§fn mark_offline_all<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
login_type: &'life1 str,
login_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = SaTokenResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn mark_offline_all<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
login_type: &'life1 str,
login_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = SaTokenResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Mark all connections offline | 标记该账号全部离线
Source§fn is_online<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
login_type: &'life1 str,
login_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = SaTokenResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn is_online<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
login_type: &'life1 str,
login_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = SaTokenResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Whether the login id is online | 登录 ID 是否在线
Source§fn get_online_count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = SaTokenResult<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_online_count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = SaTokenResult<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
get_online_count — get online count | get_online_countSource§fn get_online_users<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = SaTokenResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_online_users<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = SaTokenResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List online users for a login id | 列出某登录 ID 的在线用户
Source§fn get_user_sessions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
login_type: &'life1 str,
login_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = SaTokenResult<Vec<OnlineUser>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_user_sessions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
login_type: &'life1 str,
login_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = SaTokenResult<Vec<OnlineUser>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
get_user_sessions — get user sessions | get_user_sessionsSource§fn update_activity<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
login_type: &'life1 str,
login_id: &'life2 str,
token: &'life3 str,
) -> Pin<Box<dyn Future<Output = SaTokenResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn update_activity<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
login_type: &'life1 str,
login_id: &'life2 str,
token: &'life3 str,
) -> Pin<Box<dyn Future<Output = SaTokenResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Refresh last-activity timestamp | 刷新最近活跃时间
Source§fn prune_index<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
login_type: &'life1 str,
login_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = SaTokenResult<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn prune_index<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
login_type: &'life1 str,
login_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = SaTokenResult<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Drop index members whose record key is gone (TTL or crash).
丢掉记录键已消失的索引成员(TTL 或异常退出)。
Auto Trait Implementations§
impl !RefUnwindSafe for DistributedOnlineStore
impl !UnwindSafe for DistributedOnlineStore
impl Freeze for DistributedOnlineStore
impl Send for DistributedOnlineStore
impl Sync for DistributedOnlineStore
impl Unpin for DistributedOnlineStore
impl UnsafeUnpin for DistributedOnlineStore
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