INNER CODE UNIT · Rust
size_hint
TheWaWaR/simple-http-server · src/handlers.rs:161
fn size_hint(&self) -> SizeHint {
let mut size_hint = SizeHint::new();
if let Some(len) = self.exact_len {
size_hint.set_exact(len);
}
size_hint
}
}
impl ChannelWriter {
fn new(sender: mpsc::Sender<io::Result<Bytes>>) -> Self {
Self {
sender,
buffer: Vec::with_capacity(FILE_CHUNK_SIZE),
}
}
fn finish(mut self) -> io::Result<()> {