pub struct BearerToken(/* private fields */);Expand description
Validated framing with redacted Debug. Raw bytes are wiped when released.
Implementations§
Source§impl BearerToken
impl BearerToken
Sourcepub fn new(token: impl Into<String>) -> Result<Self, StoreError>
pub fn new(token: impl Into<String>) -> Result<Self, StoreError>
Validate a raw token for the Authorization: Bearer header.
§Errors
StoreError when the token is empty, longer than 16 KiB less the
Bearer prefix, or contains anything but visible ASCII (no spaces
or control characters).
Trait Implementations§
Source§impl Clone for BearerToken
impl Clone 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 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