pub struct SocketCapabilities { /* private fields */ }
Expand description
Indicators of sockopts configured for a socket.
On Linux, a socket can be configured using a SocketCapabilitiesBuilder
,
which returns the sockopts that were applied successfully. By default, all
options are assumed to be disabled (including on OSes besides Linux).
As a shortcut, you may call apply_all_and_get_compatibility
to apply the
maxmimum set of capabilities supported by this crate. The result will
indicate which options were actually enabled.
Implementations§
Source§impl SocketCapabilities
impl SocketCapabilities
Sourcepub fn apply_all_and_get_compatibility<S>(
socket: &S,
max_send_udp_payload_size: usize,
) -> Selfwhere
S: AsFd,
pub fn apply_all_and_get_compatibility<S>(
socket: &S,
max_send_udp_payload_size: usize,
) -> Selfwhere
S: AsFd,
Tries to enable all supported sockopts and returns indicators of which settings were successfully applied.
Trait Implementations§
Source§impl Debug for SocketCapabilities
impl Debug for SocketCapabilities
Source§impl Default for SocketCapabilities
impl Default for SocketCapabilities
Source§fn default() -> SocketCapabilities
fn default() -> SocketCapabilities
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SocketCapabilities
impl RefUnwindSafe for SocketCapabilities
impl Send for SocketCapabilities
impl Sync for SocketCapabilities
impl Unpin for SocketCapabilities
impl UnwindSafe for SocketCapabilities
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> 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>
Converts
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>
Converts
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