Trait netstack3_core::tcp::ReceiveBuffer
source · pub trait ReceiveBuffer: Buffer {
// Required methods
fn write_at<P: Payload>(&mut self, offset: usize, data: &P) -> usize;
fn make_readable(&mut self, count: usize);
}
Expand description
A buffer supporting TCP receiving operations.
Required Methods§
sourcefn write_at<P: Payload>(&mut self, offset: usize, data: &P) -> usize
fn write_at<P: Payload>(&mut self, offset: usize, data: &P) -> usize
Writes data
into the buffer at offset
.
Returns the number of bytes written.
sourcefn make_readable(&mut self, count: usize)
fn make_readable(&mut self, count: usize)
Marks count
bytes available for the application to read.
§Panics
Panics if the caller attempts to make more bytes readable than the
buffer has capacity for. That is, this method panics if
self.len() + count > self.cap()
Object Safety§
This trait is not object safe.