From 16125bd3be26ea458eb58c079d8c96c71df47cc0 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Sun, 7 Jul 2024 20:19:56 +0100 Subject: [PATCH] docs(multipart): doc PayloadBuffer::readline --- actix-multipart/src/payload.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/actix-multipart/src/payload.rs b/actix-multipart/src/payload.rs index ed5477997..fae4ba032 100644 --- a/actix-multipart/src/payload.rs +++ b/actix-multipart/src/payload.rs @@ -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, Error> { self.read_until(b"\n")