pub struct State {
pub buf: Vec<u8>,
pub waker: Option<Waker>,
pub chunk_size: usize,
}
Expand description
A central shared state of the socket where all socket data are stored.
Fields§
§buf: Vec<u8>
A buffer holding buffered bytes of the socket.
waker: Option<Waker>
The Waker reference of the root socket. The socket stores this reference to enable async notifications across cloned socket instances.
chunk_size: usize
The maximum size of a chunk returned by a stream.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
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