mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-24 00:21:08 +01:00
docs(multipart): doc PayloadBuffer::readline
This commit is contained in:
parent
e9ccfbc866
commit
16125bd3be
@ -122,7 +122,13 @@ impl PayloadBuffer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Reads bytes until new line delimiter.
|
/// Reads bytes until new line delimiter (`\n`, `0x0A`).
|
||||||
|
///
|
||||||
|
/// Returns:
|
||||||
|
///
|
||||||
|
/// - `Ok(Some(chunk))` - `needle` is found, with chunk ending after needle
|
||||||
|
/// - `Err(Incomplete)` - `needle` is not found and we're at EOF
|
||||||
|
/// - `Ok(None)` - `needle` is not found otherwise
|
||||||
#[inline]
|
#[inline]
|
||||||
pub(crate) fn readline(&mut self) -> Result<Option<Bytes>, Error> {
|
pub(crate) fn readline(&mut self) -> Result<Option<Bytes>, Error> {
|
||||||
self.read_until(b"\n")
|
self.read_until(b"\n")
|
||||||
|
Loading…
Reference in New Issue
Block a user