Struct ocipkg::distribution::AuthChallenge
source · [−]Expand description
WWW-Authentication challenge
use ocipkg::distribution::AuthChallenge;
let auth = AuthChallenge::from_header(
r#"Bearer realm="https://ghcr.io/token",service="ghcr.io",scope="repository:termoshtt/ocipkg/rust-lib:pull""#,
).unwrap();
assert_eq!(auth, AuthChallenge {
url: "https://ghcr.io/token".to_string(),
service: "ghcr.io".to_string(),
scope: "repository:termoshtt/ocipkg/rust-lib:pull".to_string(),
});
Fields
url: String
service: String
scope: String
Implementations
sourceimpl AuthChallenge
impl AuthChallenge
pub fn from_header(header: &str) -> Result<Self>
Trait Implementations
sourceimpl Clone for AuthChallenge
impl Clone for AuthChallenge
sourcefn clone(&self) -> AuthChallenge
fn clone(&self) -> AuthChallenge
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for AuthChallenge
impl Debug for AuthChallenge
sourceimpl PartialEq<AuthChallenge> for AuthChallenge
impl PartialEq<AuthChallenge> for AuthChallenge
sourcefn eq(&self, other: &AuthChallenge) -> bool
fn eq(&self, other: &AuthChallenge) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
impl Eq for AuthChallenge
impl StructuralEq for AuthChallenge
impl StructuralPartialEq for AuthChallenge
Auto Trait Implementations
impl RefUnwindSafe for AuthChallenge
impl Send for AuthChallenge
impl Sync for AuthChallenge
impl Unpin for AuthChallenge
impl UnwindSafe for AuthChallenge
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more