#[non_exhaustive]pub struct CommonListenOptions {
pub(crate) send_buffer_size: Option<usize>,
pub(crate) recv_buffer_size: Option<usize>,
}Expand description
Options to use when initializing a listening socket.
This may include both options that affect the listening, and options that will apply to any individual accepted connection streams.
It can include options set with setsockopt,
as well as options that influence higher layers (eg, the runtime).
For established streams that are accepted from a listener,
you can use StreamOps to perform additional operations
or to configure additional options.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.send_buffer_size: Option<usize>Value set for SO_SNDBUF on the listening socket.
recv_buffer_size: Option<usize>Value set for SO_RCVBUF on the listening socket.
Implementations§
Source§impl CommonListenOptions
impl CommonListenOptions
Sourcepub fn send_buffer_size(&self) -> &Option<usize>
pub fn send_buffer_size(&self) -> &Option<usize>
Method borrowing CommonListenOptions::send_buffer_size field.
Value set for SO_SNDBUF on the listening socket.
Sourcepub fn recv_buffer_size(&self) -> &Option<usize>
pub fn recv_buffer_size(&self) -> &Option<usize>
Method borrowing CommonListenOptions::recv_buffer_size field.
Value set for SO_RCVBUF on the listening socket.
Source§impl CommonListenOptions
impl CommonListenOptions
Sourcepub fn builder() -> CommonListenOptionsBuilder
pub fn builder() -> CommonListenOptionsBuilder
Returns a builder for this CommonListenOptions.
Trait Implementations§
Source§impl Clone for CommonListenOptions
impl Clone for CommonListenOptions
Source§fn clone(&self) -> CommonListenOptions
fn clone(&self) -> CommonListenOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CommonListenOptions
Source§impl Debug for CommonListenOptions
impl Debug for CommonListenOptions
Source§impl Default for CommonListenOptions
impl Default for CommonListenOptions
impl Eq for CommonListenOptions
Source§impl PartialEq for CommonListenOptions
impl PartialEq for CommonListenOptions
Source§fn eq(&self, other: &CommonListenOptions) -> bool
fn eq(&self, other: &CommonListenOptions) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CommonListenOptions
Auto Trait Implementations§
impl Freeze for CommonListenOptions
impl RefUnwindSafe for CommonListenOptions
impl Send for CommonListenOptions
impl Sync for CommonListenOptions
impl Unpin for CommonListenOptions
impl UnsafeUnpin for CommonListenOptions
impl UnwindSafe for CommonListenOptions
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more