pub enum CloseReason {
None,
Graceful,
Aborted,
}Expand description
Reason for connection closure - distinguishes FIN vs RST semantics.
In real TCP:
- FIN (graceful close): Peer gets EOF on read, writes may still work briefly
- RST (aborted close): Peer gets ECONNRESET immediately on both read and write
Variants§
None
Connection is not closed
Graceful
Graceful close (FIN) - peer will get EOF on read
Aborted
Aborted close (RST) - peer will get ECONNRESET
Trait Implementations§
Source§impl Clone for CloseReason
impl Clone for CloseReason
Source§fn clone(&self) -> CloseReason
fn clone(&self) -> CloseReason
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CloseReason
impl Debug for CloseReason
Source§impl Default for CloseReason
impl Default for CloseReason
Source§fn default() -> CloseReason
fn default() -> CloseReason
Returns the “default value” for a type. Read more
Source§impl PartialEq for CloseReason
impl PartialEq for CloseReason
impl Copy for CloseReason
impl Eq for CloseReason
impl StructuralPartialEq for CloseReason
Auto Trait Implementations§
impl Freeze for CloseReason
impl RefUnwindSafe for CloseReason
impl Send for CloseReason
impl Sync for CloseReason
impl Unpin for CloseReason
impl UnwindSafe for CloseReason
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)