pub struct PathIndex {
pub paths: HashMap<String, FileHandle>,
pub next_handle: FileHandle,
pub fst_index: Option<PathFSTIndex>,
}Expand description
Path index supporting both JSON (0.1) and FST (0.2) formats
Fields§
§paths: HashMap<String, FileHandle>§next_handle: FileHandle§fst_index: Option<PathFSTIndex>Implementations§
Source§impl PathIndex
impl PathIndex
pub fn new() -> Self
pub fn add_path(&mut self, path: String) -> FileHandle
pub fn get_handle(&self, path: &str) -> Option<FileHandle>
pub fn get_path(&self, handle: FileHandle) -> Option<String>
pub fn write_to_file(&self, path: &Path) -> Result<()>
pub fn read_from_file(path: &Path) -> Result<Self>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PathIndex
impl<'de> Deserialize<'de> for PathIndex
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PathIndex
impl RefUnwindSafe for PathIndex
impl Send for PathIndex
impl Sync for PathIndex
impl Unpin for PathIndex
impl UnwindSafe for PathIndex
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