pub struct Session { /* private fields */ }Expand description
Represents a client and holds all of its data, may it be active or not.
If the client is connected, peer is used to retrieve its information and
send him packets.
Implementations§
Source§impl Session
impl Session
Sourcepub fn new(client_id: &str, peer: Arc<Peer>, cache: Arc<Cache>) -> Self
pub fn new(client_id: &str, peer: Arc<Peer>, cache: Arc<Cache>) -> Self
Creates a new session, giving a peer and an id
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnwindSafe for Session
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