pub enum Linger {
Off,
Abortive,
Timeout(Duration),
}Expand description
What happens to unsent data at close.
assert_ne!(net_io::Linger::Off, net_io::Linger::Abortive);Variants§
Off
The OS default: close returns at once, the kernel sends what it can.
Abortive
RST on close; kernel resources are freed at once.
Timeout(Duration)
Close waits up to this long for unsent data.
Trait Implementations§
impl Copy for Linger
impl Eq for Linger
impl StructuralPartialEq for Linger
Auto Trait Implementations§
impl Freeze for Linger
impl RefUnwindSafe for Linger
impl Send for Linger
impl Sync for Linger
impl Unpin for Linger
impl UnsafeUnpin for Linger
impl UnwindSafe for Linger
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