Struct libfortress::Database
source · [−]pub struct Database { /* private fields */ }
Implementations
sourceimpl Database
impl Database
pub fn new_with_password<U: AsRef<str>, P: AsRef<str>>(
username: U,
password: P
) -> Database
pub fn change_password<A: AsRef<str>, B: AsRef<str>>(
&mut self,
username: A,
password: B
)
pub fn get_username(&self) -> &str
pub fn get_login_id(&self) -> &LoginId
pub fn get_login_key(&self) -> &LoginKey
pub fn get_sync_url(&self) -> Option<&Url>
pub fn set_sync_url(&mut self, url: Option<Url>)
pub fn get_root(&self) -> &Directory
pub fn get_root_mut(&mut self) -> &mut Directory
pub fn new_entry(&mut self)
pub fn add_entry(&mut self, entry: Entry)
pub fn add_directory(&mut self, directory: Directory)
pub fn get_entry_by_id(&self, id: &ID) -> Option<&Entry>
pub fn get_entry_by_id_mut(&mut self, id: &ID) -> Option<&mut Entry>
pub fn get_directory_by_id(&self, id: &ID) -> Option<&Directory>
pub fn get_directory_by_id_mut(&mut self, id: &ID) -> Option<&mut Directory>
pub fn list_directories(&self) -> impl Iterator<Item = &Directory>
pub fn list_directories_mut(&mut self) -> impl Iterator<Item = &mut Directory>
pub fn list_entries(&self) -> impl Iterator<Item = &Entry>
pub fn list_entries_mut(&mut self) -> impl Iterator<Item = &mut Entry>
pub fn get_parent_directory(&self, id: &ID) -> Option<&Directory>
pub fn get_parent_directory_mut(&mut self, id: &ID) -> Option<&mut Directory>
pub fn move_object(&mut self, id: &ID, new_parent: &ID)
pub fn save_to_path<P: AsRef<Path>>(&self, path: P) -> Result<(), FortressError>
pub fn load_from_reader<P: AsRef<str>, R: Read>(
password: P,
reader: &mut R
) -> Result<Database, FortressError>
pub fn load_from_path<P: AsRef<Path>, A: AsRef<str>>(
path: P,
password: A
) -> Result<Database, FortressError>
pub fn sync(&mut self) -> Result<(), FortressError>
Trait Implementations
impl Eq for Database
impl StructuralEq for Database
impl StructuralPartialEq for Database
Auto Trait Implementations
impl RefUnwindSafe for Database
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl UnwindSafe for Database
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.