[][src]Struct conjure_object::bearer_token::BearerToken

pub struct BearerToken(_);

An authentication bearer token.

Bearer tokens are strings which match the regular expression ^[A-Za-z0-9\-\._~\+/]+=*$.

Methods

impl BearerToken[src]

pub fn new(s: &str) -> Result<BearerToken, ParseError>[src]

Creates a bearer token from a string, validating that it is in the correct format.

This function behaves identically to BearerToken's FromStr implementation.

pub fn as_str(&self) -> &str[src]

Returns the string representation of the bearer token.

pub fn into_string(self) -> String[src]

Consumes the bearer token, returning its owned string representation.

Trait Implementations

impl Plain for BearerToken[src]

impl FromPlain for BearerToken[src]

type Err = <BearerToken as FromStr>::Err

The error type returned when parsing fails.

impl AsRef<str> for BearerToken[src]

impl Clone for BearerToken[src]

impl Eq for BearerToken[src]

impl Ord for BearerToken[src]

impl PartialEq<BearerToken> for BearerToken[src]

impl PartialOrd<BearerToken> for BearerToken[src]

impl Debug for BearerToken[src]

impl FromStr for BearerToken[src]

type Err = ParseError

The associated error which can be returned from parsing.

impl Hash for BearerToken[src]

impl StructuralPartialEq for BearerToken[src]

impl StructuralEq for BearerToken[src]

impl Borrow<str> for BearerToken[src]

impl Serialize for BearerToken[src]

impl<'de> Deserialize<'de> for BearerToken[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToPlain for T where
    T: Plain + ?Sized
[src]

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, 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> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]