pub struct PlainTextToken { /* private fields */ }Expand description
A freshly issued token, and the one moment its secret exists in the clear.
Returned by NewToken::issue and by nothing else. Show
plain_text to the person once; there is no way to
recover it afterwards, because the store never had it.
Implementations§
Source§impl PlainTextToken
impl PlainTextToken
Sourcepub fn plain_text(&self) -> &str
pub fn plain_text(&self) -> &str
<id>|<secret> — what the client sends as its bearer credential.
Sourcepub fn into_plain_text(self) -> String
pub fn into_plain_text(self) -> String
The credential, consuming the wrapper.
pub fn into_token(self) -> Token
pub fn into_parts(self) -> (Token, String)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PlainTextToken
impl RefUnwindSafe for PlainTextToken
impl Send for PlainTextToken
impl Sync for PlainTextToken
impl Unpin for PlainTextToken
impl UnsafeUnpin for PlainTextToken
impl UnwindSafe for PlainTextToken
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