Trait Accountable

Source
pub trait Accountable {
    // Required method
    fn record_count(&self) -> i64;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Expand description

An type containing a number of records accounted for by progress tracking.

The object stores a number of updates and thus is able to describe it count (update_count()) and whether it is empty (is_empty()). It is empty if the update count is zero.

Required Methods§

Source

fn record_count(&self) -> i64

The number of records

This number is used in progress tracking to confirm the receipt of some number of outstanding records, and it is highly load bearing. The main restriction is imposed on the LengthPreservingContainerBuilder trait, whose implementors must preserve the number of records.

Provided Methods§

Source

fn is_empty(&self) -> bool

Determine if this contains any updates, corresponding to update_count() == 0. It is a correctness error for this to by anything other than self.record_count() == 0.

Implementations on Foreign Types§

Source§

impl<T> Accountable for Rc<T>
where T: Accountable,

Source§

impl<T> Accountable for Arc<T>
where T: Accountable,

Source§

impl<T> Accountable for Vec<T>

Implementors§