pub struct CreateOptions<P: AsRef<Path>> { /* private fields */ }
Expand description
Options needed to create the backend.
You must pass the path, where the directory tree should be stored, to
CreateOptions::for_path()
, if creating a CreateOptions
instance.
Furthermore the following options can be specified:
CreateOptions::with_bsize()
: Specifies the block size of the backend. This is the number of bytes, which can be stored in an individual block. The minimum block size is 512 bytes. The default is512
.
Implementations§
Source§impl<P: AsRef<Path>> CreateOptions<P>
impl<P: AsRef<Path>> CreateOptions<P>
Sourcepub fn for_path(path: P) -> Self
pub fn for_path(path: P) -> Self
Creates a new CreateOptions
instance.
You must pass the path
, where the directory tree should be stored, to
the function.
For further options default values are applied.
Sourcepub fn with_bsize(self, bsize: u32) -> Self
pub fn with_bsize(self, bsize: u32) -> Self
Assigns a new block size to the options.
This is the number of bytes, which can be stored in an individual block.
Trait Implementations§
Source§impl<P: Clone + AsRef<Path>> Clone for CreateOptions<P>
impl<P: Clone + AsRef<Path>> Clone for CreateOptions<P>
Source§fn clone(&self) -> CreateOptions<P>
fn clone(&self) -> CreateOptions<P>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<P: AsRef<Path>> Create<DirectoryBackend<P>> for CreateOptions<P>
impl<P: AsRef<Path>> Create<DirectoryBackend<P>> for CreateOptions<P>
Auto Trait Implementations§
impl<P> Freeze for CreateOptions<P>where
P: Freeze,
impl<P> RefUnwindSafe for CreateOptions<P>where
P: RefUnwindSafe,
impl<P> Send for CreateOptions<P>where
P: Send,
impl<P> Sync for CreateOptions<P>where
P: Sync,
impl<P> Unpin for CreateOptions<P>where
P: Unpin,
impl<P> UnwindSafe for CreateOptions<P>where
P: UnwindSafe,
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