mirror of
https://github.com/actix/actix-web.git
synced 2024-11-22 01:21:10 +00:00
docs(multipart): doc PayloadBuffer::readline
This commit is contained in:
parent
e9ccfbc866
commit
16125bd3be
1 changed files with 7 additions and 1 deletions
|
@ -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]
|
||||
pub(crate) fn readline(&mut self) -> Result<Option<Bytes>, Error> {
|
||||
self.read_until(b"\n")
|
||||
|
|
Loading…
Reference in a new issue