Struct distant_net::manager::ManagerServer
source · pub struct ManagerServer { /* private fields */ }Expand description
Represents a manager of multiple server connections.
Implementations
Trait Implementations
sourceimpl ServerHandler for ManagerServer
impl ServerHandler for ManagerServer
type Request = ManagerRequest
type Request = ManagerRequest
Type of data received by the server
type Response = ManagerResponse
type Response = ManagerResponse
Type of data sent back by the server
type LocalData = DistantManagerServerConnection
type LocalData = DistantManagerServerConnection
Type of data to store locally tied to the specific connection
sourcefn on_request<'life0, 'async_trait>(
&'life0 self,
ctx: ServerCtx<Self::Request, Self::Response, Self::LocalData>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn on_request<'life0, 'async_trait>(
&'life0 self,
ctx: ServerCtx<Self::Request, Self::Response, Self::LocalData>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Invoked upon receiving a request from a client. The server should process this
request, which can be found in
ctx, and send one or more replies in response. Read moresourcefn on_accept<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: ConnectionCtx<'life1, Self::LocalData>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
fn on_accept<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: ConnectionCtx<'life1, Self::LocalData>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
Invoked upon a new connection becoming established. Read more
Auto Trait Implementations
impl !RefUnwindSafe for ManagerServer
impl Send for ManagerServer
impl Sync for ManagerServer
impl Unpin for ManagerServer
impl !UnwindSafe for ManagerServer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more