#[non_exhaustive]pub struct WriteCheck {
pub id: ConnectionId,
pub lane: Lane,
pub bytes: u32,
pub response_started: bool,
pub response: Option<GateTag>,
}Expand description
The write the gate is asked about.
use net_io::{ConnectionId, Lane, WriteCheck};
let w = WriteCheck::new(ConnectionId::new(1).unwrap(), Lane(0), 512, false, None);
assert_eq!(w.bytes, 512);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.id: ConnectionIdThe connection.
lane: LaneIts lane.
bytes: u32The size of the chunk about to be written.
response_started: boolWhether a byte of the current response already left.
response: Option<GateTag>The tag the session gave Output::begin_tagged_response.
Implementations§
Source§impl WriteCheck
impl WriteCheck
Sourcepub fn new(
id: ConnectionId,
lane: Lane,
bytes: u32,
response_started: bool,
response: Option<GateTag>,
) -> WriteCheck
pub fn new( id: ConnectionId, lane: Lane, bytes: u32, response_started: bool, response: Option<GateTag>, ) -> WriteCheck
Builds a check (for tests of gates).
Trait Implementations§
Source§impl Clone for WriteCheck
impl Clone for WriteCheck
impl Copy for WriteCheck
Source§impl Debug for WriteCheck
impl Debug for WriteCheck
impl Eq for WriteCheck
Source§impl PartialEq for WriteCheck
impl PartialEq for WriteCheck
impl StructuralPartialEq for WriteCheck
Auto Trait Implementations§
impl Freeze for WriteCheck
impl RefUnwindSafe for WriteCheck
impl Send for WriteCheck
impl Sync for WriteCheck
impl Unpin for WriteCheck
impl UnsafeUnpin for WriteCheck
impl UnwindSafe for WriteCheck
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