pub struct FinalPartDataStream<S>{ /* private fields */ }Expand description
The strict variant of a taken part stream.
Created with PartDataStream::into_final, it yields the remaining data
chunks of the part — each one non-empty — and then validates the strict
closing trailer: \r\n--boundary--\r\n followed by end of stream, with
transport padding (SP / HTAB) allowed between the closing -- and the
final CRLF, as RFC 2046 section 5.1.1 allows for a boundary line. An
epilogue or another part is rejected because callers derive the exact
content length from the multipart byte accounting.
Implementations§
Source§impl<S> FinalPartDataStream<S>
impl<S> FinalPartDataStream<S>
Sourcepub fn multipart_consumed(&self) -> u64
pub fn multipart_consumed(&self) -> u64
Returns the total number of multipart bytes consumed at the moment the stream was taken, excluding bytes retained in the internal buffer.
This is the value to subtract from the request Content-Length when
deriving the exact file length. It does not count bytes yielded by
this stream itself.