hyper_old_types::header

Trait Scheme

Source
pub trait Scheme:
    FromStr
    + Debug
    + Clone
    + Send
    + Sync {
    // Required methods
    fn scheme() -> Option<&'static str>;
    fn fmt_scheme(&self, _: &mut Formatter<'_>) -> Result;
}
Expand description

An Authorization scheme to be used in the header.

Required Methods§

Source

fn scheme() -> Option<&'static str>

An optional Scheme name.

Will be replaced with an associated constant once available.

Source

fn fmt_scheme(&self, _: &mut Formatter<'_>) -> Result

Format the Scheme data into a header value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Scheme for String

Source§

fn scheme() -> Option<&'static str>

Source§

fn fmt_scheme(&self, f: &mut Formatter<'_>) -> Result

Implementors§