pub struct Store { /* private fields */ }
Expand description
A content-addressable store for compressed Wayback Machine pages.
Implementations
sourceimpl 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 RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnwindSafe for Store
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more