pub struct Vault { /* private fields */ }Implementations§
Source§impl Vault
impl Vault
pub fn new() -> Result<Self>
pub fn exists(&self) -> bool
pub fn unlock(&mut self, password: Option<&str>) -> Result<()>
pub fn create(&mut self, password: Option<&str>) -> Result<()>
pub fn is_unlocked(&self) -> bool
pub fn add_server(&mut self, server: Server) -> Result<()>
pub fn remove_server(&mut self, id: &Uuid) -> Result<bool>
pub fn list_servers(&self) -> Result<&Vec<Server>>
pub fn find_server(&self, id: &Uuid) -> Result<Option<&Server>>
pub fn replace_server(&mut self, server: Server) -> Result<bool>
pub fn vault_path(&self) -> &PathBuf
Auto Trait Implementations§
impl Freeze for Vault
impl RefUnwindSafe for Vault
impl Send for Vault
impl Sync for Vault
impl Unpin for Vault
impl UnwindSafe for Vault
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> 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