Trait poem::web::headers::authorization::Credentials
source · [−]pub trait Credentials {
const SCHEME: &'static str;
fn decode(value: &HeaderValue) -> Option<Self>;
fn encode(&self) -> HeaderValue;
}
Expand description
Credentials to be used in the Authorization
header.
Required Associated Constants
Required Methods
sourcefn decode(value: &HeaderValue) -> Option<Self>
fn decode(value: &HeaderValue) -> Option<Self>
Try to decode the credentials from the HeaderValue
.
The SCHEME
will be the first part of the value
.
sourcefn encode(&self) -> HeaderValue
fn encode(&self) -> HeaderValue
Encode the credentials to a HeaderValue
.
The SCHEME
must be the first part of the value
.