[−][src]Struct httpcodec::RequestDecoder
HTTP request decoder.
Methods
impl<D: BodyDecode> RequestDecoder<D>
[src]
pub fn new(body_decoder: D) -> Self
[src]
Make a new RequestDecoder
instance.
pub fn with_options(body_decoder: D, options: DecodeOptions) -> Self
[src]
Make a new RequestDecoder
instance with the given options.
Trait Implementations
impl<D: Default + BodyDecode> Default for RequestDecoder<D>
[src]
impl<D: Debug> Debug for RequestDecoder<D>
[src]
impl<D: BodyDecode> Decode for RequestDecoder<D>
[src]
Auto Trait Implementations
impl<D> Send for RequestDecoder<D> where
D: Send,
D: Send,
impl<D> Unpin for RequestDecoder<D> where
D: Unpin,
D: Unpin,
impl<D> Sync for RequestDecoder<D> where
D: Sync,
D: Sync,
impl<D> RefUnwindSafe for RequestDecoder<D> where
D: RefUnwindSafe,
D: RefUnwindSafe,
impl<D> UnwindSafe for RequestDecoder<D> where
D: UnwindSafe,
D: UnwindSafe,
Blanket Implementations
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<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> IoDecodeExt for T where
T: Decode,
[src]
T: Decode,
fn decode_from_read_buf<B>(&mut self, buf: &mut ReadBuf<B>) -> Result<(), Error> where
B: AsRef<[u8]>,
[src]
B: AsRef<[u8]>,
Consumes bytes from the given read buffer and proceeds the decoding process.
fn decode_exact<R>(&mut self, reader: R) -> Result<Self::Item, Error> where
R: Read,
[src]
R: Read,
Decodes an item from the given reader. Read more
impl<T> DecodeExt for T where
T: Decode,
[src]
T: Decode,
fn map<T, F>(self, f: F) -> Map<Self, T, F> where
F: Fn(Self::Item) -> T,
[src]
F: Fn(Self::Item) -> T,
Creates a decoder that converts decoded values by calling the given function. Read more
fn try_map<T, E, F>(self, f: F) -> TryMap<Self, T, E, F> where
F: Fn(Self::Item) -> Result<T, E>,
Error: From<E>,
[src]
F: Fn(Self::Item) -> Result<T, E>,
Error: From<E>,
Creates a decoder that tries to convert decoded values by calling the given function. Read more
fn map_err<E, F>(self, f: F) -> MapErr<Self, E, F> where
F: Fn(Error) -> E,
Error: From<E>,
[src]
F: Fn(Error) -> E,
Error: From<E>,
Creates a decoder for modifying decoding errors produced by self
. Read more
fn and_then<D, F>(self, f: F) -> AndThen<Self, D, F> where
D: Decode,
F: Fn(Self::Item) -> D,
[src]
D: Decode,
F: Fn(Self::Item) -> D,
Creates a decoder that enables conditional decoding. Read more
fn collect<T>(self) -> Collect<Self, T> where
T: Extend<Self::Item> + Default,
[src]
T: Extend<Self::Item> + Default,
Creates a decoder for collecting decoded items. Read more
fn collectn<T>(self, n: usize) -> CollectN<Self, T> where
T: Extend<Self::Item> + Default,
[src]
T: Extend<Self::Item> + Default,
Creates a decoder that decodes n
items by using self
and collecting the result. Read more
fn length(self, expected_bytes: u64) -> Length<Self>
[src]
Creates a decoder that consumes the specified number of bytes exactly. Read more
fn omit(self, do_omit: bool) -> Omittable<Self>
[src]
Creates a decoder that will omit decoding items if do_omit = true
is specified. Read more
fn max_bytes(self, bytes: u64) -> MaxBytes<Self>
[src]
Creates a decoder that will fail if the number of consumed bytes exceeds bytes
. Read more
fn chain<T>(self, other: T) -> TupleDecoder<(Self, T)> where
T: Decode,
[src]
T: Decode,
Takes two decoders and creates a new decoder that decodes both items in sequence. Read more
fn slice(self) -> Slice<Self>
[src]
Creates a decoder that makes it possible to slice the input byte sequence in arbitrary units. Read more
fn peekable(self) -> Peekable<Self>
[src]
Creates a decoder that enables to peek decoded items before calling finish_decoding
method. Read more
fn maybe_eos(self) -> MaybeEos<Self>
[src]
Creates a decoder that ignores EOS if there is no item being decoded. Read more
fn decode_from_bytes(&mut self, buf: &[u8]) -> Result<Self::Item, Error>
[src]
Decodes an item by consuming the whole part of the given bytes. Read more