Skip to main content

DecodeHeader

Trait DecodeHeader 

Source
pub trait DecodeHeader<T> {
    // Required method
    fn decode<'a, I>(runtime: &ConjureRuntime, headers: I) -> Result<T, Error>
       where I: IntoIterator<Item = &'a HeaderValue>;
}
Expand description

A trait implemented by header decoders used by custom Conjure server trait implementations.

Required Methods§

Source

fn decode<'a, I>(runtime: &ConjureRuntime, headers: I) -> Result<T, Error>
where I: IntoIterator<Item = &'a HeaderValue>,

Decodes the value from headers.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T, D, U> DecodeHeader<T> for FromDecoder<D, U>
where T: From<U>, D: DecodeHeader<U>,

Source§

impl<T> DecodeHeader<Option<T>> for FromPlainOptionDecoder
where T: FromPlain, T::Err: Into<Box<dyn Error + Sync + Send>>,

Source§

impl<T> DecodeHeader<Option<T>> for FromStrOptionDecoder
where T: FromStr, T::Err: Into<Box<dyn Error + Sync + Send>>,

Source§

impl<T> DecodeHeader<T> for FromPlainDecoder
where T: FromPlain, T::Err: Into<Box<dyn Error + Sync + Send>>,

Source§

impl<T> DecodeHeader<T> for FromStrDecoder
where T: FromStr, T::Err: Into<Box<dyn Error + Sync + Send>>,