pub struct CachePairReader { /* private fields */ }Expand description
A cache pair reader.
Implementations§
Source§impl CachePairReader
impl CachePairReader
Sourcepub fn get_directory_node<T: Into<PathBuf>>(&self, path: T) -> Option<Node>
pub fn get_directory_node<T: Into<PathBuf>>(&self, path: T) -> Option<Node>
Get the directory node for the given path.
Sourcepub fn get_file_node<T: Into<PathBuf>>(&self, path: T) -> Option<Node>
pub fn get_file_node<T: Into<PathBuf>>(&self, path: T) -> Option<Node>
Get the file node for the given path.
Sourcepub fn directories(&self) -> &Vec<Node>
pub fn directories(&self) -> &Vec<Node>
Get the directory nodes
Trait Implementations§
Source§impl CachePair for CachePairReader
impl CachePair for CachePairReader
Source§fn new(
toc_path: PathBuf,
cache_path: PathBuf,
is_post_ensmallening: bool,
) -> Self
fn new( toc_path: PathBuf, cache_path: PathBuf, is_post_ensmallening: bool, ) -> Self
Creates a new cache pair from the specified TOC and cache paths.
Source§fn is_post_ensmallening(&self) -> bool
fn is_post_ensmallening(&self) -> bool
Returns whether the package is post-ensmallening. Read more
Source§fn cache_path(&self) -> PathBuf
fn cache_path(&self) -> PathBuf
Returns the cache file path.
Source§fn unread_toc(&mut self)
fn unread_toc(&mut self)
Unreads the TOC file. Read more
Source§const MAGIC_NUMBER: u64 = 409_454_158u64
const MAGIC_NUMBER: u64 = 409_454_158u64
The magic number for the cache pair.
Source§const ARCHIVE_VERSION: u64 = 20u64
const ARCHIVE_VERSION: u64 = 20u64
The archive version for the cache pair.
Auto Trait Implementations§
impl Freeze for CachePairReader
impl !RefUnwindSafe for CachePairReader
impl Send for CachePairReader
impl Sync for CachePairReader
impl Unpin for CachePairReader
impl !UnwindSafe for CachePairReader
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