pub struct ServerDispatcher<P, T: Transport = <P as HasTransport>::Transport> { /* private fields */ }Expand description
A strongly typed server.
Implementations§
Source§impl<P, T: Transport> ServerDispatcher<P, T>
 
impl<P, T: Transport> ServerDispatcher<P, T>
Sourcepub fn new(server_end: ServerEnd<P, T>) -> Self
 
pub fn new(server_end: ServerEnd<P, T>) -> Self
Creates a new server dispatcher from a server end.
Sourcepub fn from_untyped(server: ServerDispatcher<T>) -> Self
 
pub fn from_untyped(server: ServerDispatcher<T>) -> Self
Creates a new server dispatcher from an untyped server dispatcher.
Sourcepub async fn run<H>(self, handler: H) -> Result<H, ProtocolError<T::Error>>where
    P: DispatchServerMessage<H, T>,
    H: Send,
 
pub async fn run<H>(self, handler: H) -> Result<H, ProtocolError<T::Error>>where
    P: DispatchServerMessage<H, T>,
    H: Send,
Runs the server with the provided handler.
Trait Implementations§
Auto Trait Implementations§
impl<P, T> Freeze for ServerDispatcher<P, T>
impl<P, T = <P as HasTransport>::Transport> !RefUnwindSafe for ServerDispatcher<P, T>
impl<P, T> Sync for ServerDispatcher<P, T>
impl<P, T> Unpin for ServerDispatcher<P, T>
impl<P, T = <P as HasTransport>::Transport> !UnwindSafe for ServerDispatcher<P, T>
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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
    D: ResourceDialect,
 
impl<T, D> Encode<Ambiguous1, D> for Twhere
    D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
    D: ResourceDialect,
 
impl<T, D> Encode<Ambiguous2, D> for Twhere
    D: ResourceDialect,
Source§impl<T> InstanceFromServiceTransport<T> for T
 
impl<T> InstanceFromServiceTransport<T> for T
Source§fn from_service_transport(handle: T) -> T
 
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type 
T to Self