pub struct Store { /* private fields */ }
Expand description
A content-addressable store for compressed Wayback Machine pages.
Implementations§
Source§impl Store
impl Store
pub fn new<P: AsRef<Path>>(path: P) -> Self
pub fn create<P: AsRef<Path>>(base: P) -> Result<Self, Error>
pub fn compute_digests( &self, prefix: Option<&str>, n: usize, ) -> impl Stream<Item = Result<(String, String), Error>>
pub fn paths(&self) -> impl Iterator<Item = Result<(String, PathBuf), Error>>
pub fn paths_for_prefix( &self, prefix: &str, ) -> impl Iterator<Item = Result<(String, PathBuf), Error>>
pub fn check_file_location<P: AsRef<Path>>( &self, candidate: P, ) -> Result<Option<(String, Result<Box<Path>, String>)>, Error>
pub fn location(&self, digest: &str) -> Option<Box<Path>>
pub fn contains(&self, digest: &str) -> bool
pub fn lookup(&self, digest: &str) -> Option<Box<Path>>
pub fn extract_reader( &self, digest: &str, ) -> Option<Result<BufReader<GzDecoder<File>>, Error>>
pub fn extract(&self, digest: &str) -> Option<Result<String, Error>>
pub fn extract_bytes(&self, digest: &str) -> Option<Result<Vec<u8>, Error>>
Auto Trait Implementations§
impl Freeze for Store
impl RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnwindSafe for Store
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