[][src]Struct digest_auth::Algorithm

pub struct Algorithm {
    pub algo: AlgorithmType,
    pub sess: bool,
}

Algorithm and the -sess flag pair

Fields

algo: AlgorithmTypesess: bool

Methods

impl Algorithm[src]

pub fn new(algo: AlgorithmType, sess: bool) -> Algorithm[src]

Compose from algorithm type and the -sess flag

pub fn hash(self, bytes: &[u8]) -> String[src]

Calculate a hash of bytes using the selected algorithm

pub fn hash_str(self, bytes: &str) -> String[src]

Calculate a hash of string's bytes using the selected algorithm

Trait Implementations

impl Clone for Algorithm[src]

impl Copy for Algorithm[src]

impl Default for Algorithm[src]

fn default() -> Self[src]

Get a MD5 instance

impl PartialEq<Algorithm> for Algorithm[src]

impl Debug for Algorithm[src]

impl Display for Algorithm[src]

fn fmt(&self, f: &mut Formatter) -> Result[src]

Format to the form used in HTTP headers

impl FromStr for Algorithm[src]

type Err = Error

The associated error which can be returned from parsing.

fn from_str(s: &str) -> Result<Self>[src]

Parse from the format used in WWW-Authorization

impl StructuralPartialEq for Algorithm[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self