pub struct FileTable { /* private fields */ }Expand description
File table for tracking unique source files
Implementations§
Source§impl FileTable
impl FileTable
pub fn new() -> Self
Sourcepub fn get_or_assign_id(&mut self, path: &str) -> u32
pub fn get_or_assign_id(&mut self, path: &str) -> u32
Get or assign file ID for a path
Sourcepub fn get_info_by_path(&self, path: &str) -> Option<&FileInfo>
pub fn get_info_by_path(&self, path: &str) -> Option<&FileInfo>
Get file info by path
Sourcepub fn set_file_hash(&mut self, path: &str, hash: &str)
pub fn set_file_hash(&mut self, path: &str, hash: &str)
Set file hash
Sourcepub fn get_file_hash(&self, path: &str) -> Option<&str>
pub fn get_file_hash(&self, path: &str) -> Option<&str>
Get file hash
Sourcepub fn file_count(&self) -> usize
pub fn file_count(&self) -> usize
Get total number of unique files
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self>
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
Deserialize from bytes
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileTable
impl RefUnwindSafe for FileTable
impl Send for FileTable
impl Sync for FileTable
impl Unpin for FileTable
impl UnsafeUnpin for FileTable
impl UnwindSafe for FileTable
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