pub struct ParallelScan<BaseJob, MergeJob> {
pub trees: Vec<Tree<Base<BaseJob>, Merge<MergeJob>>>,
pub(super) acc: Option<(MergeJob, Vec<BaseJob>)>,
pub curr_job_seq_no: SequenceNumber,
pub(super) max_base_jobs: u64,
pub(super) delay: u64,
}
Fields§
§trees: Vec<Tree<Base<BaseJob>, Merge<MergeJob>>>
§acc: Option<(MergeJob, Vec<BaseJob>)>
last emitted proof and the corresponding transactions
curr_job_seq_no: SequenceNumber
Sequence number for the jobs added every block
max_base_jobs: u64
transaction_capacity_log_2
delay: u64
Implementations§
Source§impl<BaseJob, MergeJob> ParallelScan<BaseJob, MergeJob>
impl<BaseJob, MergeJob> ParallelScan<BaseJob, MergeJob>
fn with_leaner_trees(&self) -> Self
pub fn empty(max_base_jobs: u64, delay: u64) -> Self
fn map<F1, F2>(&self, f1: F1, f2: F2) -> Self
pub fn hash<FunMerge, FunBase>( &self, fun_merge: FunMerge, fun_base: FunBase, ) -> GenericArray<u8, U32>
pub fn fold_chronological_until<Accum, Final, FunMerge, FunBase, FunFinish>(
&self,
init: Accum,
fun_merge: FunMerge,
fun_base: FunBase,
fun_finish: FunFinish,
) -> Finalwhere
FunMerge: Fn(Accum, &Merge<MergeJob>) -> ControlFlow<Final, Accum>,
FunBase: Fn(Accum, &Base<BaseJob>) -> ControlFlow<Final, Accum>,
FunFinish: Fn(Accum) -> Final,
pub fn fold_chronological_until_err<Accum, FunMerge, FunBase, FunFinish>( &self, init: Accum, fun_merge: FunMerge, fun_base: FunBase, fun_finish: FunFinish, ) -> Result<Accum, String>
fn fold_chronological<Accum, FunMerge, FunBase>( &self, init: Accum, fun_merge: FunMerge, fun_base: FunBase, ) -> Accum
fn max_trees(&self) -> u64
fn work_for_tree( &self, data_tree: WorkForTree, ) -> Vec<AvailableJob<BaseJob, MergeJob>>
Sourcefn all_work(&self) -> Vec<Vec<AvailableJob<BaseJob, MergeJob>>>
fn all_work(&self) -> Vec<Vec<AvailableJob<BaseJob, MergeJob>>>
work on all the level and all the trees
fn work_for_next_update( &self, data_count: u64, ) -> Vec<Vec<AvailableJob<BaseJob, MergeJob>>>
fn free_space_on_current_tree(&self) -> u64
fn add_merge_jobs( &mut self, completed_jobs: &[MergeJob], ) -> Result<Option<(MergeJob, Vec<BaseJob>)>, ()>
fn add_data( &mut self, data: Vec<BaseJob>, base_kind: impl Fn(&BaseJob) -> usize, ) -> Result<(), ()>
fn reset_seq_no(&mut self)
fn incr_sequence_no(&mut self)
fn update_helper( &mut self, data: Vec<BaseJob>, completed_jobs: Vec<MergeJob>, base_kind: impl Fn(&BaseJob) -> usize, ) -> Result<Option<(MergeJob, Vec<BaseJob>)>, ()>
pub fn update( &mut self, data: Vec<BaseJob>, completed_jobs: Vec<MergeJob>, base_kind: impl Fn(&BaseJob) -> usize, ) -> Result<Option<(MergeJob, Vec<BaseJob>)>, ()>
pub fn all_jobs(&self) -> Vec<Vec<AvailableJob<BaseJob, MergeJob>>>
pub fn jobs_for_next_update(&self) -> Vec<Vec<AvailableJob<BaseJob, MergeJob>>>
pub fn jobs_for_slots( &self, slots: u64, ) -> Vec<Vec<AvailableJob<BaseJob, MergeJob>>>
pub fn free_space(&self) -> u64
pub fn last_emitted_value(&self) -> Option<&(MergeJob, Vec<BaseJob>)>
fn current_job_sequence_number(&self) -> SequenceNumber
pub fn base_jobs_on_latest_tree(&self) -> impl Iterator<Item = BaseJob>
pub fn base_jobs_on_earlier_tree( &self, index: usize, ) -> impl Iterator<Item = BaseJob>
pub fn partition_if_overflowing(&self) -> SpacePartition
pub fn next_on_new_tree(&self) -> bool
pub fn pending_data(&self) -> Vec<Vec<BaseJob>>
fn job_count(&self) -> (f64, f64)
Trait Implementations§
Source§impl<BaseJob: Clone, MergeJob: Clone> Clone for ParallelScan<BaseJob, MergeJob>
impl<BaseJob: Clone, MergeJob: Clone> Clone for ParallelScan<BaseJob, MergeJob>
Source§fn clone(&self) -> ParallelScan<BaseJob, MergeJob>
fn clone(&self) -> ParallelScan<BaseJob, MergeJob>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<BaseJob, MergeJob> Freeze for ParallelScan<BaseJob, MergeJob>where
MergeJob: Freeze,
impl<BaseJob, MergeJob> RefUnwindSafe for ParallelScan<BaseJob, MergeJob>where
MergeJob: RefUnwindSafe,
BaseJob: RefUnwindSafe,
impl<BaseJob, MergeJob> Send for ParallelScan<BaseJob, MergeJob>
impl<BaseJob, MergeJob> Sync for ParallelScan<BaseJob, MergeJob>
impl<BaseJob, MergeJob> Unpin for ParallelScan<BaseJob, MergeJob>
impl<BaseJob, MergeJob> UnwindSafe for ParallelScan<BaseJob, MergeJob>where
MergeJob: UnwindSafe,
BaseJob: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
Formats each item in a sequence. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref()
only in debug builds, and is erased in release
builds.