pub struct SparseMetadata { /* private fields */ }
Expand description
§Metadata about the pointer
SparseMetadata store crucial information like the file the pointer is pointing, the inner pointer inside that file and the last correct version of the file since the last update.
Implementations§
Source§impl SparseMetadata
impl SparseMetadata
Sourcepub fn pfile_path(&self) -> &PathBuf
pub fn pfile_path(&self) -> &PathBuf
The parent file path, if not in-memory
Sourcepub fn raw_pointer(&self) -> &String
pub fn raw_pointer(&self) -> &String
The pointer string, as it is set in the original Value
Source§impl SparseMetadata
impl SparseMetadata
Sourcepub fn version(&self) -> u64
pub fn version(&self) -> u64
The last version the deserialized value, if any. If that version mismatch with the one in SparseState, it will force SparseRef to parse the value again to update it.
Source§impl SparseMetadata
impl SparseMetadata
Sourcepub fn version_mut(&mut self) -> &mut u64
pub fn version_mut(&mut self) -> &mut u64
The last version the deserialized value, if any. If that version mismatch with the one in SparseState, it will force SparseRef to parse the value again to update it.
Sourcepub fn raw_pointer_mut(&mut self) -> &mut String
pub fn raw_pointer_mut(&mut self) -> &mut String
The pointer string, as it is set in the original Value
Source§impl SparseMetadata
impl SparseMetadata
Sourcepub fn normalize_path(
path: PathBuf,
base_path: PathBuf,
) -> Result<PathBuf, SparseError>
pub fn normalize_path( path: PathBuf, base_path: PathBuf, ) -> Result<PathBuf, SparseError>
Make a base absolute, using base_path
as the current working directory
Sourcepub fn new(raw_ptr: String, path: PathBuf) -> Self
pub fn new(raw_ptr: String, path: PathBuf) -> Self
Create a new SparseMetadata
Trait Implementations§
Source§impl Clone for SparseMetadata
impl Clone for SparseMetadata
Source§fn clone(&self) -> SparseMetadata
fn clone(&self) -> SparseMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more