Struct conjure_object::BearerToken
source · pub struct BearerToken(/* private fields */);
Expand description
An authentication bearer token.
Bearer tokens are strings which match the regular expression ^[A-Za-z0-9\-\._~\+/]+=*$
.
Implementations§
source§impl BearerToken
impl BearerToken
sourcepub fn new(s: &str) -> Result<BearerToken, ParseError>
pub fn new(s: &str) -> Result<BearerToken, ParseError>
Creates a bearer token from a string, validating that it is in the correct format.
This function behaves identically to BearerToken
’s FromStr
implementation.
sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the bearer token, returning its owned string representation.
Trait Implementations§
source§impl AsRef<str> for BearerToken
impl AsRef<str> for BearerToken
source§impl Borrow<str> for BearerToken
impl Borrow<str> for BearerToken
source§impl Clone for BearerToken
impl Clone for BearerToken
source§fn clone(&self) -> BearerToken
fn clone(&self) -> BearerToken
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for BearerToken
impl Debug for BearerToken
source§impl<'de> Deserialize<'de> for BearerToken
impl<'de> Deserialize<'de> for BearerToken
source§fn deserialize<D>(d: D) -> Result<BearerToken, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(d: D) -> Result<BearerToken, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl FromPlain for BearerToken
impl FromPlain for BearerToken
source§impl FromStr for BearerToken
impl FromStr for BearerToken
source§type Err = ParseError
type Err = ParseError
The associated error which can be returned from parsing.
source§fn from_str(s: &str) -> Result<BearerToken, ParseError>
fn from_str(s: &str) -> Result<BearerToken, ParseError>
Parses a string
s
to return a value of this type. Read moresource§impl Hash for BearerToken
impl Hash for BearerToken
source§impl Ord for BearerToken
impl Ord for BearerToken
source§fn cmp(&self, other: &BearerToken) -> Ordering
fn cmp(&self, other: &BearerToken) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for BearerToken
impl PartialEq for BearerToken
source§impl PartialOrd for BearerToken
impl PartialOrd for BearerToken
source§impl Plain for BearerToken
impl Plain for BearerToken
source§impl Serialize for BearerToken
impl Serialize for BearerToken
impl Eq for BearerToken
impl StructuralPartialEq for BearerToken
Auto Trait Implementations§
impl Freeze for BearerToken
impl RefUnwindSafe for BearerToken
impl Send for BearerToken
impl Sync for BearerToken
impl Unpin for BearerToken
impl UnwindSafe for BearerToken
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)