pub struct DirectoryLayer { /* private fields */ }
Expand description
A DirectoryLayer defines a new root directory. The node subspace and content subspace control where the directory metadata and contents, respectively, are stored. The default root directory has a node subspace with raw prefix \xFE and a content subspace with no prefix.
Implementations§
Trait Implementations§
Source§impl Clone for DirectoryLayer
impl Clone for DirectoryLayer
Source§fn clone(&self) -> DirectoryLayer
fn clone(&self) -> DirectoryLayer
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for DirectoryLayer
impl Debug for DirectoryLayer
Source§impl Default for DirectoryLayer
impl Default for DirectoryLayer
Source§fn default() -> Self
fn default() -> Self
The default root directory stores directory layer metadata in keys beginning with 0xFE, and allocates newly created directories in (unused) prefixes starting with 0x00 through 0xFD. This is appropriate for otherwise empty databases, but may conflict with other formal or informal partitionings of keyspace. If you already have other content in your database, you may wish to use NewDirectoryLayer to construct a non-standard root directory to control where metadata and keys are stored.
Source§impl Deref for DirectoryLayer
impl Deref for DirectoryLayer
Source§impl Directory for DirectoryLayer
impl Directory for DirectoryLayer
Source§fn move_to<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
trx: &'life1 Transaction,
old_path: &'life2 [String],
new_path: &'life3 [String],
) -> Pin<Box<dyn Future<Output = Result<DirectoryOutput, DirectoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn move_to<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
trx: &'life1 Transaction,
old_path: &'life2 [String],
new_path: &'life3 [String],
) -> Pin<Box<dyn Future<Output = Result<DirectoryOutput, DirectoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
move_to
the directory from old_path to new_path(both relative to this
Directory), and returns the directory (at its new location) and its
contents as a Subspace. Move will return an error if a directory
does not exist at oldPath, a directory already exists at newPath, or the
parent directory of newPath does not exist.