pub struct SessionFacade<'a, H: SessionFacadeHandler> { /* private fields */ }Implementations§
Source§impl<'a, H: SessionFacadeHandler> SessionFacade<'a, H>
impl<'a, H: SessionFacadeHandler> SessionFacade<'a, H>
pub fn new(server: &'a mut RaknetServer, handler: &'a mut H) -> Self
pub fn with_adapter( server: &'a mut RaknetServer, handler: &'a mut H, adapter: SessionIdAdapter, ) -> Self
pub async fn next(&mut self) -> Result<bool>
pub async fn run(&mut self) -> Result<()>
pub fn server(&self) -> &RaknetServer
pub fn server_mut(&mut self) -> &mut RaknetServer
pub fn handler(&self) -> &H
pub fn handler_mut(&mut self) -> &mut H
pub fn adapter(&self) -> &SessionIdAdapter
pub fn adapter_mut(&mut self) -> &mut SessionIdAdapter
pub fn session_id_for_peer(&self, peer_id: PeerId) -> Option<SessionId>
pub fn peer_id_for_session(&self, session_id: SessionId) -> Option<PeerId>
pub fn peer_id_for_session_i32(&self, session_id: i32) -> Option<PeerId>
pub async fn send( &mut self, session_id: SessionId, payload: impl Into<Bytes>, ) -> Result<()>
pub async fn send_with_options( &mut self, session_id: SessionId, payload: impl Into<Bytes>, options: SendOptions, ) -> Result<()>
pub async fn send_with_receipt( &mut self, session_id: SessionId, payload: impl Into<Bytes>, receipt_id: u64, ) -> Result<()>
pub async fn disconnect(&mut self, session_id: SessionId) -> Result<()>
Auto Trait Implementations§
impl<'a, H> Freeze for SessionFacade<'a, H>
impl<'a, H> !RefUnwindSafe for SessionFacade<'a, H>
impl<'a, H> Send for SessionFacade<'a, H>where
H: Send,
impl<'a, H> Sync for SessionFacade<'a, H>where
H: Sync,
impl<'a, H> Unpin for SessionFacade<'a, H>
impl<'a, H> UnsafeUnpin for SessionFacade<'a, H>
impl<'a, H> !UnwindSafe for SessionFacade<'a, H>
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