pub struct UnitsOfWork(/* private fields */);Expand description
A collection of units of work grouped by flow
Each inner vector represents one flow’s units, ordered by version. The flow’s units must be processed sequentially to maintain version ordering. Different flows (outer vector) can be processed in parallel.
Implementations§
Source§impl UnitsOfWork
impl UnitsOfWork
Sourcepub fn new(flow_units: Vec<Vec<UnitOfWork>>) -> Self
pub fn new(flow_units: Vec<Vec<UnitOfWork>>) -> Self
Create a new UnitsOfWork from a vector of flow units
Sourcepub fn flow_count(&self) -> usize
pub fn flow_count(&self) -> usize
Get the number of flows
Sourcepub fn total_units(&self) -> usize
pub fn total_units(&self) -> usize
Get the total number of units across all flows
Sourcepub fn as_inner(&self) -> &Vec<Vec<UnitOfWork>>
pub fn as_inner(&self) -> &Vec<Vec<UnitOfWork>>
Get a reference to the inner vector
Sourcepub fn into_inner(self) -> Vec<Vec<UnitOfWork>>
pub fn into_inner(self) -> Vec<Vec<UnitOfWork>>
Consume self and return the inner vector
Trait Implementations§
Source§impl Clone for UnitsOfWork
impl Clone for UnitsOfWork
Source§fn clone(&self) -> UnitsOfWork
fn clone(&self) -> UnitsOfWork
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 moreSource§impl Debug for UnitsOfWork
impl Debug for UnitsOfWork
Source§impl From<Vec<Vec<UnitOfWork>>> for UnitsOfWork
impl From<Vec<Vec<UnitOfWork>>> for UnitsOfWork
Source§impl IntoIterator for UnitsOfWork
impl IntoIterator for UnitsOfWork
Auto Trait Implementations§
impl Freeze for UnitsOfWork
impl RefUnwindSafe for UnitsOfWork
impl Send for UnitsOfWork
impl Sync for UnitsOfWork
impl Unpin for UnitsOfWork
impl UnwindSafe for UnitsOfWork
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