[−][src]Struct kayrx::web::multipart::dev::PayloadBuffer
Payload buffer
Fields
eof: bool
buf: BytesMut
Methods
impl PayloadBuffer
[src]
pub fn new<S>(stream: S) -> Self where
S: Stream<Item = Result<Bytes, PayloadError>> + 'static,
[src]
S: Stream<Item = Result<Bytes, PayloadError>> + 'static,
Create new PayloadBuffer
instance
pub fn poll_stream(&mut self, cx: &mut Context) -> Result<(), PayloadError>
[src]
pub fn read_exact(&mut self, size: usize) -> Option<Bytes>
[src]
Read exact number of bytes
pub fn read_max(&mut self, size: u64) -> Result<Option<Bytes>, MultipartError>
[src]
pub fn read_until(
&mut self,
line: &[u8]
) -> Result<Option<Bytes>, MultipartError>
[src]
&mut self,
line: &[u8]
) -> Result<Option<Bytes>, MultipartError>
Read until specified ending
pub fn readline(&mut self) -> Result<Option<Bytes>, MultipartError>
[src]
Read bytes until new line delimiter
pub fn readline_or_eof(&mut self) -> Result<Option<Bytes>, MultipartError>
[src]
Read bytes until new line delimiter or eof
pub fn unprocessed(&mut self, data: Bytes)
[src]
Put unprocessed data back to the buffer
Auto Trait Implementations
impl !RefUnwindSafe for PayloadBuffer
impl !Send for PayloadBuffer
impl !Sync for PayloadBuffer
impl Unpin for PayloadBuffer
impl !UnwindSafe for PayloadBuffer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,