Struct cosworth::prelude::server::StreamConfiguration
source · pub struct StreamConfiguration<T, E> { /* private fields */ }
Expand description
NewService
implementation for stream configuration service
Stream configuration service allows to change some socket level
parameters. for example tcp nodelay
or tcp keep-alive
.
Implementations§
source§impl<T, E> StreamConfiguration<T, E>
impl<T, E> StreamConfiguration<T, E>
sourcepub fn new() -> StreamConfiguration<T, E>
pub fn new() -> StreamConfiguration<T, E>
Create new StreamConfigurationService
instance.
sourcepub fn nodelay(self, nodelay: bool) -> StreamConfiguration<T, E>
pub fn nodelay(self, nodelay: bool) -> StreamConfiguration<T, E>
Sets the value of the TCP_NODELAY
option on this socket.
sourcepub fn tcp_keepalive(
self,
keepalive: Option<Duration>
) -> StreamConfiguration<T, E>
pub fn tcp_keepalive(
self,
keepalive: Option<Duration>
) -> StreamConfiguration<T, E>
Sets whether keepalive messages are enabled to be sent on this socket.
Trait Implementations§
source§impl<T, E> Default for StreamConfiguration<T, E>
impl<T, E> Default for StreamConfiguration<T, E>
source§fn default() -> StreamConfiguration<T, E>
fn default() -> StreamConfiguration<T, E>
Returns the “default value” for a type. Read more
source§impl<T, E> NewService for StreamConfiguration<T, E>where
T: IoStream,
impl<T, E> NewService for StreamConfiguration<T, E>where
T: IoStream,
§type Future = FutureResult<<StreamConfiguration<T, E> as NewService>::Service, <StreamConfiguration<T, E> as NewService>::InitError>
type Future = FutureResult<<StreamConfiguration<T, E> as NewService>::Service, <StreamConfiguration<T, E> as NewService>::InitError>
The future of the
Service
instance.source§fn new_service(&self) -> <StreamConfiguration<T, E> as NewService>::Future
fn new_service(&self) -> <StreamConfiguration<T, E> as NewService>::Future
Create and return a new service value asynchronously.
Auto Trait Implementations§
impl<T, E> RefUnwindSafe for StreamConfiguration<T, E>where
E: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, E> Send for StreamConfiguration<T, E>where
E: Send,
T: Send,
impl<T, E> Sync for StreamConfiguration<T, E>where
E: Sync,
T: Sync,
impl<T, E> Unpin for StreamConfiguration<T, E>where
E: Unpin,
T: Unpin,
impl<T, E> UnwindSafe for StreamConfiguration<T, E>where
E: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
§impl<T> IntoNewService<T> for Twhere
T: NewService,
impl<T> IntoNewService<T> for Twhere
T: NewService,
§fn into_new_service(self) -> T
fn into_new_service(self) -> T
Convert to an
NewService
source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
fn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
Convert
self
to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
Convert
&self
to an expression for Diesel’s query builder. Read more§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 as NewService>::Error: Into<<<R as IntoFuture>::Future as Future>::Error>,
I: IntoNewService<S>,
F: Fn(Self::Response, &mut <S as NewService>::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>,
§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 more§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