Struct actix_net::framed::FramedNewService
source · pub struct FramedNewService<S, T, U> { /* private fields */ }
Implementations§
source§impl<S, T, U> FramedNewService<S, T, U>where
T: AsyncRead + AsyncWrite,
U: Decoder + Encoder,
S: NewService<Request = <U as Decoder>::Item, Response = <U as Encoder>::Item> + Clone,
<<S as NewService>::Service as Service>::Future: 'static,
<<S as NewService>::Service as Service>::Error: 'static,
<U as Encoder>::Item: 'static,
<U as Encoder>::Error: 'static,
impl<S, T, U> FramedNewService<S, T, U>where
T: AsyncRead + AsyncWrite,
U: Decoder + Encoder,
S: NewService<Request = <U as Decoder>::Item, Response = <U as Encoder>::Item> + Clone,
<<S as NewService>::Service as Service>::Future: 'static,
<<S as NewService>::Service as Service>::Error: 'static,
<U as Encoder>::Item: 'static,
<U as Encoder>::Error: 'static,
pub fn new<F1: IntoNewService<S>>(factory: F1) -> Self
Trait Implementations§
source§impl<S, T, U> Clone for FramedNewService<S, T, U>where
S: Clone,
impl<S, T, U> Clone for FramedNewService<S, T, U>where
S: Clone,
source§impl<S, T, U> NewService for FramedNewService<S, T, U>where
T: AsyncRead + AsyncWrite,
U: Decoder + Encoder,
S: NewService<Request = <U as Decoder>::Item, Response = <U as Encoder>::Item> + Clone,
<<S as NewService>::Service as Service>::Future: 'static,
<<S as NewService>::Service as Service>::Error: 'static,
<U as Encoder>::Item: 'static,
<U as Encoder>::Error: 'static,
impl<S, T, U> NewService for FramedNewService<S, T, U>where
T: AsyncRead + AsyncWrite,
U: Decoder + Encoder,
S: NewService<Request = <U as Decoder>::Item, Response = <U as Encoder>::Item> + Clone,
<<S as NewService>::Service as Service>::Future: 'static,
<<S as NewService>::Service as Service>::Error: 'static,
<U as Encoder>::Item: 'static,
<U as Encoder>::Error: 'static,
§type Response = FramedTransport<<S as NewService>::Service, T, U>
type Response = FramedTransport<<S as NewService>::Service, T, U>
Responses given by the service
§type Error = <S as NewService>::InitError
type Error = <S as NewService>::InitError
Errors produced by the service
§type InitError = <S as NewService>::InitError
type InitError = <S as NewService>::InitError
Errors produced while building a service.
§type Service = FramedService<S, T, U>
type Service = FramedService<S, T, U>
The
Service
value created by this factory§type Future = FutureResult<<FramedNewService<S, T, U> as NewService>::Service, <FramedNewService<S, T, U> as NewService>::InitError>
type Future = FutureResult<<FramedNewService<S, T, U> as NewService>::Service, <FramedNewService<S, T, U> as NewService>::InitError>
The future of the
Service
instance.source§fn new_service(&self) -> Self::Future
fn new_service(&self) -> Self::Future
Create and return a new service value asynchronously.
Auto Trait Implementations§
impl<S, T, U> RefUnwindSafe for FramedNewService<S, T, U>where
S: RefUnwindSafe,
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<S, T, U> Send for FramedNewService<S, T, U>where
S: Send,
T: Send,
U: Send,
impl<S, T, U> Sync for FramedNewService<S, T, U>where
S: Sync,
T: Sync,
U: Sync,
impl<S, T, U> Unpin for FramedNewService<S, T, U>where
S: Unpin,
T: Unpin,
U: Unpin,
impl<S, T, U> UnwindSafe for FramedNewService<S, T, U>where
S: UnwindSafe,
T: UnwindSafe,
U: UnwindSafe,
Blanket Implementations§
source§impl<T> IntoNewService<T> for Twhere
T: NewService,
impl<T> IntoNewService<T> for Twhere
T: NewService,
source§fn into_new_service(self) -> T
fn into_new_service(self) -> T
Convert to an
NewService
source§impl<T> NewServiceExt for Twhere
T: NewService + ?Sized,
impl<T> NewServiceExt for Twhere
T: NewService + ?Sized,
fn apply<S, I, F, R>(
self,
service: I,
f: F
) -> AndThenNewService<Self, ApplyNewService<S, F, R, Self::Response>>where
Self: Sized,
S: NewService<InitError = Self::InitError>,
S::Error: Into<<R::Future as Future>::Error>,
I: IntoNewService<S>,
F: Fn(Self::Response, &mut S::Service) -> R + Clone,
R: IntoFuture<Error = Self::Error>,
fn and_then<F, B>(self, new_service: F) -> AndThenNewService<Self, B>where
Self: Sized,
F: IntoNewService<B>,
B: NewService<Request = Self::Response, Error = Self::Error, InitError = Self::InitError>,
source§fn from_err<E>(self) -> FromErrNewService<Self, E>where
Self: Sized,
E: From<Self::Error>,
fn from_err<E>(self) -> FromErrNewService<Self, E>where
Self: Sized,
E: From<Self::Error>,
NewService
that create service to map this service’s error
and new service’s init error to any error
implementing From
for this services
Error`. Read moresource§fn then<F, B>(self, new_service: F) -> ThenNewService<Self, B>where
Self: Sized,
F: IntoNewService<B>,
B: NewService<Request = Result<Self::Response, Self::Error>, Error = Self::Error, InitError = Self::InitError>,
fn then<F, B>(self, new_service: F) -> ThenNewService<Self, B>where
Self: Sized,
F: IntoNewService<B>,
B: NewService<Request = Result<Self::Response, Self::Error>, Error = Self::Error, InitError = Self::InitError>,
Create
NewService
to chain on a computation for when a call to the
service finished, passing the result of the call to the next
service B
. Read more