pub struct MultiserverDispatcher<P, T: Transport = <P as HasTransport>::Transport> { /* private fields */ }Expand description
A dispatcher for a multiserver.
A multiserver runs servers for multiple transmports using the same handler.
See Multiserver for usage details.
Implementations§
Source§impl<P, T: Transport> MultiserverDispatcher<P, T>
impl<P, T: Transport> MultiserverDispatcher<P, T>
Sourcepub async fn run<H>(self, handler: H)where
P: DispatchServerMessage<H, T>,
H: Send,
pub async fn run<H>(self, handler: H)where
P: DispatchServerMessage<H, T>,
H: Send,
Runs the multiserver with the provided handler.
The handler will be called with messages from multiple transports.
Sourcepub async fn run_local<H>(self, handler: H)where
P: DispatchLocalServerMessage<H, T>,
pub async fn run_local<H>(self, handler: H)where
P: DispatchLocalServerMessage<H, T>,
Runs the multiserver with the provided local handler.
The handler will be called with messages from multiple transports.
Auto Trait Implementations§
impl<P, T> Freeze for MultiserverDispatcher<P, T>
impl<P, T = <P as HasTransport>::Transport> !RefUnwindSafe for MultiserverDispatcher<P, T>
impl<P, T> Send for MultiserverDispatcher<P, T>
impl<P, T> Sync for MultiserverDispatcher<P, T>
impl<P, T> Unpin for MultiserverDispatcher<P, T>where
P: Unpin,
impl<P, T> UnsafeUnpin for MultiserverDispatcher<P, T>
impl<P, T = <P as HasTransport>::Transport> !UnwindSafe for MultiserverDispatcher<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> 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