pub struct ProfileVault { /* private fields */ }Implementations§
Source§impl ProfileVault
impl ProfileVault
pub fn new() -> Self
pub fn with_root(root: PathBuf) -> Self
pub fn load_profiles(&self) -> Result<Vec<AccountProfile>>
pub fn save_profiles(&self, profiles: &[AccountProfile]) -> Result<()>
pub fn load_quotas(&self) -> Result<Vec<AccountQuotaRecord>>
pub fn save_quotas(&self, quotas: &[AccountQuotaRecord]) -> Result<()>
pub fn get_adapter(&self, provider: ProviderKind) -> Box<dyn ProviderAdapter>
pub fn add_account( &self, provider: ProviderKind, name: &str, email: Option<String>, label: Option<String>, capture_current: bool, ) -> Result<AccountProfile>
pub fn switch_account(&self, provider: ProviderKind, name: &str) -> Result<()>
pub fn record_usage( &self, provider: ProviderKind, name: &str, units: u64, ) -> Result<()>
pub fn get_account_quota_snapshots( &self, provider: Option<ProviderKind>, ) -> Result<Vec<QuotaSnapshot>>
pub fn pick_best_account( &self, provider: ProviderKind, ) -> Result<Option<String>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProfileVault
impl RefUnwindSafe for ProfileVault
impl Send for ProfileVault
impl Sync for ProfileVault
impl Unpin for ProfileVault
impl UnsafeUnpin for ProfileVault
impl UnwindSafe for ProfileVault
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