pub struct BearerToken { /* private fields */ }Expand description
A bearer token whose formatting and errors never reveal its contents.
Implementations§
Source§impl BearerToken
impl BearerToken
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, BearerTokenError>
pub fn new(value: impl AsRef<str>) -> Result<Self, BearerTokenError>
Creates a non-empty bearer token within the fixed comparison budget.
§Errors
Returns BearerTokenError when the value is empty, whitespace-only, or larger than the
fixed token budget.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BearerToken
impl RefUnwindSafe for BearerToken
impl Send for BearerToken
impl Sync for BearerToken
impl Unpin for BearerToken
impl UnsafeUnpin 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