Struct actix_utils::dispatcher::Dispatcher [−][src]
Dispatcher is a future that reads frames from Framed object and passes them to the service.
Implementations
impl<S, T, U, I> Dispatcher<S, T, U, I> where
S: Service<<U as Decoder>::Item, Response = I>,
S::Error: 'static,
S::Future: 'static,
T: AsyncRead + AsyncWrite,
U: Decoder + Encoder<I>,
I: 'static,
<U as Decoder>::Error: Debug,
<U as Encoder<I>>::Error: Debug, [src]
S: Service<<U as Decoder>::Item, Response = I>,
S::Error: 'static,
S::Future: 'static,
T: AsyncRead + AsyncWrite,
U: Decoder + Encoder<I>,
I: 'static,
<U as Decoder>::Error: Debug,
<U as Encoder<I>>::Error: Debug,
pub fn new<F>(framed: Framed<T, U>, service: F) -> Self where
F: IntoService<S, <U as Decoder>::Item>, [src]
F: IntoService<S, <U as Decoder>::Item>,
pub fn with_rx<F>(
framed: Framed<T, U>,
service: F,
rx: Receiver<Result<Message<I>, S::Error>>
) -> Self where
F: IntoService<S, <U as Decoder>::Item>, [src]
framed: Framed<T, U>,
service: F,
rx: Receiver<Result<Message<I>, S::Error>>
) -> Self where
F: IntoService<S, <U as Decoder>::Item>,
Construct new Dispatcher instance with customer mpsc::Receiver
pub fn get_sink(&self) -> Sender<Result<Message<I>, S::Error>>[src]
Get sink
pub fn get_ref(&self) -> &S[src]
Get reference to a service wrapped by Dispatcher instance.
pub fn get_mut(&mut self) -> &mut S[src]
Get mutable reference to a service wrapped by Dispatcher instance.
pub fn get_framed(&self) -> &Framed<T, U>[src]
Get reference to a framed instance wrapped by Dispatcher
instance.
pub fn get_framed_mut(&mut self) -> &mut Framed<T, U>[src]
Get mutable reference to a framed instance wrapped by Dispatcher instance.
Trait Implementations
impl<S, T, U, I> Future for Dispatcher<S, T, U, I> where
S: Service<<U as Decoder>::Item, Response = I>,
S::Error: 'static,
S::Future: 'static,
T: AsyncRead + AsyncWrite,
U: Decoder + Encoder<I>,
I: 'static,
<U as Encoder<I>>::Error: Debug,
<U as Decoder>::Error: Debug, [src]
S: Service<<U as Decoder>::Item, Response = I>,
S::Error: 'static,
S::Future: 'static,
T: AsyncRead + AsyncWrite,
U: Decoder + Encoder<I>,
I: 'static,
<U as Encoder<I>>::Error: Debug,
<U as Decoder>::Error: Debug,
type Output = Result<(), DispatcherError<S::Error, U, I>>
The type of value produced on completion.
fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>[src]
impl<'__pin, S, T, U, I> Unpin for Dispatcher<S, T, U, I> where
__Origin<'__pin, S, T, U, I>: Unpin,
S: Service<<U as Decoder>::Item, Response = I>,
S::Error: 'static,
S::Future: 'static,
T: AsyncRead,
T: AsyncWrite,
U: Encoder<I>,
U: Decoder,
I: 'static,
<U as Encoder<I>>::Error: Debug, [src]
__Origin<'__pin, S, T, U, I>: Unpin,
S: Service<<U as Decoder>::Item, Response = I>,
S::Error: 'static,
S::Future: 'static,
T: AsyncRead,
T: AsyncWrite,
U: Encoder<I>,
U: Decoder,
I: 'static,
<U as Encoder<I>>::Error: Debug,
Auto Trait Implementations
impl<S, T, U, I> !RefUnwindSafe for Dispatcher<S, T, U, I>[src]
impl<S, T, U, I> !Send for Dispatcher<S, T, U, I>[src]
impl<S, T, U, I> !Sync for Dispatcher<S, T, U, I>[src]
impl<S, T, U, I> !UnwindSafe for Dispatcher<S, T, U, I>[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<F> IntoFuture for F where
F: Future, [src]
F: Future,
type Output = <F as Future>::Output
🔬 This is a nightly-only experimental API. (
into_future)The output that the future will produce on completion.
type Future = F
🔬 This is a nightly-only experimental API. (
into_future)Which kind of future are we turning this into?
pub fn into_future(self) -> <F as IntoFuture>::Future[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<F, T, E> TryFuture for F where
F: Future<Output = Result<T, E>> + ?Sized, [src]
F: Future<Output = Result<T, E>> + ?Sized,
type Ok = T
The type of successful values yielded by this future
type Error = E
The type of failures yielded by this future
pub fn try_poll(
self: Pin<&mut F>,
cx: &mut Context<'_>
) -> Poll<<F as Future>::Output>[src]
self: Pin<&mut F>,
cx: &mut Context<'_>
) -> Poll<<F as Future>::Output>
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,