pub struct RecentUserManager { /* private fields */ }Expand description
Manages tracking of the most recently used username
Implementations§
Source§impl RecentUserManager
impl RecentUserManager
Sourcepub fn load_recent_user(&self) -> Option<RecentUserData>
pub fn load_recent_user(&self) -> Option<RecentUserData>
Load the most recent user from disk
Sourcepub fn save_recent_user(&self, username: &str) -> Result<(), Error>
pub fn save_recent_user(&self, username: &str) -> Result<(), Error>
Save the most recent user to disk
Sourcepub fn get_recent_username(&self) -> Option<String>
pub fn get_recent_username(&self) -> Option<String>
Get the most recent username, if available
Sourcepub fn update_recent_user(&self, username: &str) -> Result<(), Error>
pub fn update_recent_user(&self, username: &str) -> Result<(), Error>
Update the recent user (or create if it doesn’t exist)
Sourcepub fn clear_recent_user(&self) -> Result<(), Error>
pub fn clear_recent_user(&self) -> Result<(), Error>
Clear the recent user file
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RecentUserManager
impl RefUnwindSafe for RecentUserManager
impl Send for RecentUserManager
impl Sync for RecentUserManager
impl Unpin for RecentUserManager
impl UnsafeUnpin for RecentUserManager
impl UnwindSafe for RecentUserManager
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