pub struct SocketConfig { /* private fields */ }
Expand description
A middleware for socket options config of TcpStream
and UnixStream
.
Implementations§
Source§impl SocketConfig
impl SocketConfig
pub const fn new() -> Self
Sourcepub fn set_nodelay(self, value: bool) -> Self
pub fn set_nodelay(self, value: bool) -> Self
For more information about this option, see set_nodelay
.
Sourcepub fn keep_alive_with_time(self, time: Duration) -> Self
pub fn keep_alive_with_time(self, time: Duration) -> Self
For more information about this option, see with_time
.
Sourcepub fn keep_alive_with_interval(self, time: Duration) -> Self
pub fn keep_alive_with_interval(self, time: Duration) -> Self
For more information about this option, see with_interval
.
Sourcepub fn keep_alive_with_retries(self, retries: u32) -> Self
pub fn keep_alive_with_retries(self, retries: u32) -> Self
For more information about this option, see with_retries
.
Trait Implementations§
Source§impl Clone for SocketConfig
impl Clone for SocketConfig
Source§fn clone(&self) -> SocketConfig
fn clone(&self) -> SocketConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SocketConfig
impl Debug for SocketConfig
Source§impl Default for SocketConfig
impl Default for SocketConfig
Auto Trait Implementations§
impl Freeze for SocketConfig
impl RefUnwindSafe for SocketConfig
impl Send for SocketConfig
impl Sync for SocketConfig
impl Unpin for SocketConfig
impl UnwindSafe for SocketConfig
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<S, Arg> ServiceExt<Arg> for Swhere
S: Service<Arg>,
impl<S, Arg> ServiceExt<Arg> for Swhere
S: Service<Arg>,
Source§fn enclosed<T>(self, build: T) -> Pipeline<Self, T, BuildEnclosed>
fn enclosed<T>(self, build: T) -> Pipeline<Self, T, BuildEnclosed>
Enclose Self with given
T as Service<<Self as Service<_>>::Response>>
. In other word T
would take Self’s Service::Response
type as it’s generic argument of Service<_>
impl.Source§fn enclosed_fn<T, Req, O>(
self,
func: T,
) -> Pipeline<Self, AsyncFn<T>, BuildEnclosed>
fn enclosed_fn<T, Req, O>( self, func: T, ) -> Pipeline<Self, AsyncFn<T>, BuildEnclosed>
Function version of Self::enclosed method.
Source§fn map<F, Res, ResMap>(self, mapper: F) -> Pipeline<Self, Map<F>, BuildEnclosed>
fn map<F, Res, ResMap>(self, mapper: F) -> Pipeline<Self, Map<F>, BuildEnclosed>
Mutate
<<Self::Response as Service<Req>>::Future as Future>::Output
type with given
closure.