[][src]Trait http_header::data::encodings::Encoding

pub trait Encoding: Copy + Clone + Debug + Default {
    fn is_valid(bytes: &[u8]) -> bool;

    fn is_eq(a: &[u8], b: &[u8]) -> bool { ... }
fn hash(bytes: &[u8], hasher: &mut dyn Hasher) { ... } }

An encoding

Required methods

fn is_valid(bytes: &[u8]) -> bool

Checks if bytes conform to the encoding

Loading content...

Provided methods

fn is_eq(a: &[u8], b: &[u8]) -> bool

Checks if a is equal to b (can be overridden; e.g. to perform a case-insensitive comparison)

fn hash(bytes: &[u8], hasher: &mut dyn Hasher)

Hashes bytes (can be overridden; e.g. to compute a case-insensitive hash)

Loading content...

Implementors

impl Encoding for Ascii[src]

fn is_eq(a: &[u8], b: &[u8]) -> bool[src]

fn hash(bytes: &[u8], hasher: &mut dyn Hasher)[src]

impl Encoding for HeaderFieldKey[src]

impl Encoding for Integer[src]

fn is_eq(a: &[u8], b: &[u8]) -> bool[src]

fn hash(bytes: &[u8], hasher: &mut dyn Hasher)[src]

impl Encoding for Uri[src]

fn is_eq(a: &[u8], b: &[u8]) -> bool[src]

fn hash(bytes: &[u8], hasher: &mut dyn Hasher)[src]

impl Encoding for UriQuery[src]

fn is_eq(a: &[u8], b: &[u8]) -> bool[src]

fn hash(bytes: &[u8], hasher: &mut dyn Hasher)[src]

Loading content...