[−][src]Struct conjure_object::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.
fn from_plain(s: &str) -> Result<Self, Self::Err>[src]
impl PartialEq<BearerToken> for BearerToken[src]
fn eq(&self, other: &BearerToken) -> bool[src]
fn ne(&self, other: &BearerToken) -> bool[src]
impl AsRef<str> for BearerToken[src]
impl Clone for BearerToken[src]
fn clone(&self) -> BearerToken[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Ord for BearerToken[src]
fn cmp(&self, other: &BearerToken) -> Ordering[src]
fn max(self, other: Self) -> Self1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self[src]
clamp)Restrict a value to a certain interval. Read more
impl Eq for BearerToken[src]
impl PartialOrd<BearerToken> for BearerToken[src]
fn partial_cmp(&self, other: &BearerToken) -> Option<Ordering>[src]
fn lt(&self, other: &BearerToken) -> bool[src]
fn le(&self, other: &BearerToken) -> bool[src]
fn gt(&self, other: &BearerToken) -> bool[src]
fn ge(&self, other: &BearerToken) -> bool[src]
impl Debug for BearerToken[src]
impl Hash for BearerToken[src]
fn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher]. Read more
impl FromStr for BearerToken[src]
type Err = ParseError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<BearerToken, ParseError>[src]
impl Borrow<str> for BearerToken[src]
impl Serialize for BearerToken[src]
impl<'de> Deserialize<'de> for BearerToken[src]
fn deserialize<D>(d: D) -> Result<BearerToken, D::Error> where
D: Deserializer<'de>, [src]
D: Deserializer<'de>,
Auto Trait Implementations
impl Send for BearerToken
impl Sync for BearerToken
Blanket Implementations
impl<T> ToPlain for T where
T: Plain + ?Sized, [src]
T: Plain + ?Sized,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>, [src]
T: Deserialize<'de>,