pub struct PathOptions {
pub data_path: PathBuf,
pub temp_path: PathBuf,
}
Expand description
Options for directories used by the file store.
Fields§
§data_path: PathBuf
Path to the directory where data and outboard files are stored.
temp_path: PathBuf
Path to the directory where temp files are stored.
This must be on the same device as data_path
, since we need to
atomically move temp files into place.
Implementations§
Source§impl PathOptions
impl PathOptions
pub fn new(root: &Path) -> Self
pub fn data_path(&self, hash: &Hash) -> PathBuf
pub fn outboard_path(&self, hash: &Hash) -> PathBuf
pub fn sizes_path(&self, hash: &Hash) -> PathBuf
pub fn bitfield_path(&self, hash: &Hash) -> PathBuf
pub fn temp_file_name(&self) -> PathBuf
Trait Implementations§
Source§impl Clone for PathOptions
impl Clone for PathOptions
Source§fn clone(&self) -> PathOptions
fn clone(&self) -> PathOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for PathOptions
impl RefUnwindSafe for PathOptions
impl Send for PathOptions
impl Sync for PathOptions
impl Unpin for PathOptions
impl UnwindSafe for PathOptions
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