Struct rsure::node::HashUpdater
source · [−]pub struct HashUpdater<'n, S> { /* private fields */ }
Expand description
The HashUpdater is able to update hashes. This is the first pass.
Implementations
sourceimpl<'a, S: Source> HashUpdater<'a, S>
impl<'a, S: Source> HashUpdater<'a, S>
pub fn new(source: S, store: &dyn Store) -> HashUpdater<'_, S>
sourcepub fn compute(self, base: &str, estimate: &Estimate) -> Result<HashMerger<S>>
pub fn compute(self, base: &str, estimate: &Estimate) -> Result<HashMerger<S>>
First pass. Go through the source nodes, and for any that need a hash, compute the hash, and collect the results into a temporary file. Consumes the updater, returning the HashMerger which is used to merge the hash results into a datastream.
sourcepub fn compute_parallel(
self,
base: &str,
estimate: &Estimate
) -> Result<HashMerger<S>>
pub fn compute_parallel(
self,
base: &str,
estimate: &Estimate
) -> Result<HashMerger<S>>
First pass, multi-threaded version. Go through the source nodes, and for any that need a hash, compute the hash, and collect the result into a temporary file. Consumes the updater, returning the HashMerger which is used to merge the hash results into a datastream.
Auto Trait Implementations
impl<'n, S> !RefUnwindSafe for HashUpdater<'n, S>
impl<'n, S> !Send for HashUpdater<'n, S>
impl<'n, S> !Sync for HashUpdater<'n, S>
impl<'n, S> Unpin for HashUpdater<'n, S> where
S: Unpin,
impl<'n, S> !UnwindSafe for HashUpdater<'n, S>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more