pub struct TokenStore { /* private fields */ }Implementations§
Source§impl TokenStore
impl TokenStore
pub fn new(service_name: &'static str) -> Self
pub fn micropub() -> Self
pub fn indieauth() -> Self
pub fn load(&self) -> Result<Option<SecretString>>
pub fn save(&self, token: &SecretString) -> Result<()>
pub fn delete(&self) -> Result<()>
pub fn exists(&self) -> bool
pub fn resolve_token( &self, cli_token: Option<&String>, env_token: Option<&String>, ) -> Result<Option<SecretString>>
Auto Trait Implementations§
impl Freeze for TokenStore
impl RefUnwindSafe for TokenStore
impl Send for TokenStore
impl Sync for TokenStore
impl Unpin for TokenStore
impl UnsafeUnpin for TokenStore
impl UnwindSafe for TokenStore
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more