pub struct StaticTokenProvider {
pub token: SensitiveString,
}Expand description
A fixed token, from an environment variable say. It prints as [REDACTED], so a {:?}
of the provider — or of anything holding one — cannot put the token in a log.
Fields§
§token: SensitiveStringThe token.
Implementations§
Source§impl StaticTokenProvider
impl StaticTokenProvider
Sourcepub fn new(token: impl Into<SensitiveString>) -> StaticTokenProvider
pub fn new(token: impl Into<SensitiveString>) -> StaticTokenProvider
Wraps a token.
Trait Implementations§
Source§impl Clone for StaticTokenProvider
impl Clone for StaticTokenProvider
Source§fn clone(&self) -> StaticTokenProvider
fn clone(&self) -> StaticTokenProvider
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 StaticTokenProvider
impl Debug for StaticTokenProvider
Source§impl TokenProvider for StaticTokenProvider
impl TokenProvider for StaticTokenProvider
Auto Trait Implementations§
impl Freeze for StaticTokenProvider
impl RefUnwindSafe for StaticTokenProvider
impl Send for StaticTokenProvider
impl Sync for StaticTokenProvider
impl Unpin for StaticTokenProvider
impl UnsafeUnpin for StaticTokenProvider
impl UnwindSafe for StaticTokenProvider
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