tcp_lib/write/io.rs
1/// The TCP I/O request enum, emitted by flows and processed by
2/// handlers.
3///
4/// This enum represents all the possible I/O requests that a TCP flow
5/// can emit. I/O handlers should be able to handle all variants.
6#[derive(Clone, Debug, Eq, PartialEq)]
7pub enum Io {
8 /// I/O request that should be emitted by a flow needing bytes to
9 /// be write in order to continue its progression.
10 ///
11 /// When receiving this variant, I/O handlers need to write a chunk
12 /// of bytes using the [state buffer], then to tell the state [how
13 /// many bytes] have been write for the current chunk.
14 ///
15 /// [state buffer]: super::State::get_buffer
16 /// [how many bytes]: super::State::set_bytes_count
17 Write,
18}