#[non_exhaustive]pub enum Auth {
AuthToken(Box<AuthToken>),
None,
}Expand description
An OpenStack Authentication type
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl Auth
impl Auth
Sourcepub fn set_header<'a>(
&self,
headers: &'a mut HeaderMap<HeaderValue>,
) -> Result<&'a mut HeaderMap<HeaderValue>, AuthError>
pub fn set_header<'a>( &self, headers: &'a mut HeaderMap<HeaderValue>, ) -> Result<&'a mut HeaderMap<HeaderValue>, AuthError>
Adds X-Auth-Token header to a request headers.
Returns an error if the token string cannot be parsed as a header value.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Auth
impl RefUnwindSafe for Auth
impl Send for Auth
impl Sync for Auth
impl Unpin for Auth
impl UnsafeUnpin for Auth
impl UnwindSafe for Auth
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more