[][src]Struct actix_utils::framed::FramedTransport

pub struct FramedTransport<S, T, U> where
    S: Service<Request = <U as Decoder>::Item, Response = <U as Encoder>::Item>,
    S::Error: 'static,
    S::Future: 'static,
    T: AsyncRead + AsyncWrite,
    U: Encoder + Decoder,
    <U as Encoder>::Item: 'static,
    <U as Encoder>::Error: Debug
{ /* fields omitted */ }

FramedTransport - is a future that reads frames from Framed object and pass then to the service.

Methods

impl<S, T, U> FramedTransport<S, T, U> where
    S: Service<Request = <U as Decoder>::Item, Response = <U as Encoder>::Item>,
    S::Error: 'static,
    S::Future: 'static,
    T: AsyncRead + AsyncWrite,
    U: Decoder + Encoder,
    <U as Encoder>::Item: 'static,
    <U as Encoder>::Error: Debug
[src]

pub fn new<F: IntoService<S>>(framed: Framed<T, U>, service: F) -> Self[src]

pub fn set_receiver(
    self,
    rx: UnboundedReceiver<FramedMessage<<U as Encoder>::Item>>
) -> Self
[src]

Get Sender

pub fn get_ref(&self) -> &S[src]

Get reference to a service wrapped by FramedTransport instance.

pub fn get_mut(&mut self) -> &mut S[src]

Get mutable reference to a service wrapped by FramedTransport instance.

pub fn get_framed(&self) -> &Framed<T, U>[src]

Get reference to a framed instance wrapped by FramedTransport instance.

pub fn get_framed_mut(&mut self) -> &mut Framed<T, U>[src]

Get mutable reference to a framed instance wrapped by FramedTransport instance.

Trait Implementations

impl<S, T, U> Future for FramedTransport<S, T, U> where
    S: Service<Request = <U as Decoder>::Item, Response = <U as Encoder>::Item>,
    S::Error: 'static,
    S::Future: 'static,
    T: AsyncRead + AsyncWrite,
    U: Decoder + Encoder,
    <U as Encoder>::Item: 'static,
    <U as Encoder>::Error: Debug
[src]

type Item = ()

The type of value that this future will resolved with if it is successful. Read more

type Error = FramedTransportError<S::Error, U>

The type of error that this future will resolve with if it fails in a normal fashion. Read more

Auto Trait Implementations

impl<S, T, U> !Send for FramedTransport<S, T, U>

impl<S, T, U> !Sync for FramedTransport<S, T, U>

impl<S, T, U> Unpin for FramedTransport<S, T, U> where
    S: Unpin,
    T: Unpin,
    U: Unpin,
    <S as Service>::Error: Unpin,
    <U as Decoder>::Error: Unpin,
    <U as Encoder>::Error: Unpin,
    <U as Encoder>::Item: Unpin

impl<S, T, U> !UnwindSafe for FramedTransport<S, T, U>

impl<S, T, U> !RefUnwindSafe for FramedTransport<S, T, U>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<F> IntoFuture for F where
    F: Future
[src]

type Future = F

The future that this type can be converted into.

type Item = <F as Future>::Item

The item that the future may resolve with.

type Error = <F as Future>::Error

The error that the future may resolve with.