pub struct Storage<'a> { /* private fields */ }
Implementations§
Source§impl<'a> Storage<'a>
impl<'a> Storage<'a>
Sourcepub fn load(
config: &'a Config,
name: &str,
path: PathBuf,
) -> Result<Storage<'a>, LoadStorageError>
pub fn load( config: &'a Config, name: &str, path: PathBuf, ) -> Result<Storage<'a>, LoadStorageError>
Loads the storage for the given stoage path. Note that the passed path has to be the base path of the storage, not the storage file itself.
Sourcepub fn next_id(&self) -> u64
pub fn next_id(&self) -> u64
Returns the next id that would be used for a node. Does not automatically increase it, see use_id.
Sourcepub fn nodes_path(&self) -> PathBuf
pub fn nodes_path(&self) -> PathBuf
Returns the nodes path
pub fn next_node(&self) -> Node<'_, '_>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Storage<'a>
impl<'a> RefUnwindSafe for Storage<'a>
impl<'a> Send for Storage<'a>
impl<'a> Sync for Storage<'a>
impl<'a> Unpin for Storage<'a>
impl<'a> UnwindSafe for Storage<'a>
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