#[non_exhaustive]pub struct Drained {
pub peer_closed: bool,
pub discarded: u64,
}Expand description
What TcpConnection::drain saw before closing.
let d = net_io::Drained::default();
assert!(!d.peer_closed && d.discarded == 0);Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.peer_closed: boolThe peer’s FIN arrived in time: both sides finished, nothing was reset.
discarded: u64Bytes read and dropped while waiting for it.
Trait Implementations§
impl Copy for Drained
impl Eq for Drained
impl StructuralPartialEq for Drained
Auto Trait Implementations§
impl Forget for Drained
impl Freeze for Drained
impl Move for Drained
impl RefUnwindSafe for Drained
impl Send for Drained
impl Sync for Drained
impl Unpin for Drained
impl UnsafeUnpin for Drained
impl UnwindSafe for Drained
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