pub struct ConnectionManager { /* private fields */ }Expand description
连接管理器
Implementations§
Source§impl ConnectionManager
impl ConnectionManager
Sourcepub async fn add(&self, connection: Connection) -> WaeResult<()>
pub async fn add(&self, connection: Connection) -> WaeResult<()>
添加连接
Sourcepub async fn remove(&self, id: &str) -> Option<Connection>
pub async fn remove(&self, id: &str) -> Option<Connection>
移除连接
Sourcepub async fn get(&self, id: &str) -> Option<Connection>
pub async fn get(&self, id: &str) -> Option<Connection>
获取连接
Sourcepub async fn all_ids(&self) -> Vec<ConnectionId> ⓘ
pub async fn all_ids(&self) -> Vec<ConnectionId> ⓘ
获取所有连接 ID
Auto Trait Implementations§
impl Freeze for ConnectionManager
impl !RefUnwindSafe for ConnectionManager
impl Send for ConnectionManager
impl Sync for ConnectionManager
impl Unpin for ConnectionManager
impl UnsafeUnpin for ConnectionManager
impl !UnwindSafe for ConnectionManager
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