pub struct Dispatcher<S, U>where
S: Service<DispatchItem<U>, Response = Option<<U as Encoder>::Item>>,
U: Encoder + Decoder + 'static,{ /* private fields */ }
Expand description
Dispatcher - is a future that reads frames from bytes stream and pass then to the service.
Implementations§
source§impl<S, U> Dispatcher<S, U>
impl<S, U> Dispatcher<S, U>
sourcepub fn new<Io, F>(
io: Io,
codec: U,
service: F,
cfg: &DispatcherConfig,
) -> Dispatcher<S, U> ⓘ
pub fn new<Io, F>( io: Io, codec: U, service: F, cfg: &DispatcherConfig, ) -> Dispatcher<S, U> ⓘ
Construct new Dispatcher
instance.
Trait Implementations§
source§impl<S, U> Future for Dispatcher<S, U>
impl<S, U> Future for Dispatcher<S, U>
impl<'__pin, S, U> Unpin for Dispatcher<S, U>
Auto Trait Implementations§
impl<S, U> Freeze for Dispatcher<S, U>
impl<S, U> !RefUnwindSafe for Dispatcher<S, U>
impl<S, U> !Send for Dispatcher<S, U>
impl<S, U> !Sync for Dispatcher<S, U>
impl<S, U> !UnwindSafe for Dispatcher<S, U>
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<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more