pub struct FileTokenStore { /* private fields */ }Expand description
File-based implementation of TokenStore Stores tokens in ~/.config/slack-rs/tokens.json with restricted permissions (0600)
Implementations§
Source§impl FileTokenStore
impl FileTokenStore
Sourcepub fn new() -> Result<Self>
pub fn new() -> Result<Self>
Create a new FileTokenStore with the default path (~/.config/slack-rs/tokens.json)
Sourcepub fn with_path(file_path: PathBuf) -> Result<Self>
pub fn with_path(file_path: PathBuf) -> Result<Self>
Create a FileTokenStore with a custom path
Sourcepub fn default_path() -> Result<PathBuf>
pub fn default_path() -> Result<PathBuf>
Get the default path for the tokens file Can be overridden with SLACK_RS_TOKENS_PATH environment variable (useful for testing)
Trait Implementations§
Source§impl Clone for FileTokenStore
impl Clone for FileTokenStore
Source§fn clone(&self) -> FileTokenStore
fn clone(&self) -> FileTokenStore
Returns a duplicate of the value. Read more
1.0.0 · 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 FileTokenStore
impl Debug for FileTokenStore
Source§impl Default for FileTokenStore
impl Default for FileTokenStore
Source§impl TokenStore for FileTokenStore
impl TokenStore for FileTokenStore
Auto Trait Implementations§
impl Freeze for FileTokenStore
impl RefUnwindSafe for FileTokenStore
impl Send for FileTokenStore
impl Sync for FileTokenStore
impl Unpin for FileTokenStore
impl UnwindSafe for FileTokenStore
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