Struct coord::coord::antichain::AntichainToken[][src]

pub struct AntichainToken<T: PartialOrder + Ord + Clone> {
    antichain: MutableAntichain<T>,
    changes: Rc<RefCell<ChangeBatch<T>>>,
    action: Rc<RefCell<dyn FnMut(Drain<'_, (T, i64)>)>>,
}
Expand description

A token that holds a mutable antichain and invokes an action should it change.

Fields

antichain: MutableAntichain<T>changes: Rc<RefCell<ChangeBatch<T>>>action: Rc<RefCell<dyn FnMut(Drain<'_, (T, i64)>)>>

Implementations

Creates a new token.

Advance the frontier of the mutable antichain to frontier, if frontier is ahead of the current frontier.

This function intentionally does not assert that frontier will necessarily be in advance of the current frontier because some uses in the Coordinator don’t work well with that. Specifically, in the Coordinator its possible for a since frontier to be ahead of the upper frontier for an index, and changes to the upper frontier cause the Coordinator to want to “advance” the since to new_upper - logical_compaction_window which might not be in advance of the existing since frontier. TODO: can we remove maybe_advance and replace with a stricter advace that requires callers to present incresing frontiers?

Methods from Deref<Target = MutableAntichain<T>>

Reveals the minimal elements with positive count.

Examples
 use timely::progress::frontier::MutableAntichain;

 let mut frontier = MutableAntichain::<usize>::new();
 assert!(frontier.frontier().len() == 0);

Returns true if there are no elements in the MutableAntichain.

Examples
 use timely::progress::frontier::MutableAntichain;

 let mut frontier = MutableAntichain::<usize>::new();
 assert!(frontier.is_empty());

Returns true if any item in the MutableAntichain is strictly less than the argument.

Examples
 use timely::progress::frontier::MutableAntichain;

 let mut frontier = MutableAntichain::new_bottom(1u64);
 assert!(!frontier.less_than(&0));
 assert!(!frontier.less_than(&1));
 assert!(frontier.less_than(&2));

Returns true if any item in the MutableAntichain is less than or equal to the argument.

Examples
 use timely::progress::frontier::MutableAntichain;

 let mut frontier = MutableAntichain::new_bottom(1u64);
 assert!(!frontier.less_equal(&0));
 assert!(frontier.less_equal(&1));
 assert!(frontier.less_equal(&2));

Reports the count for a queried time.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

The resulting type after dereferencing.

Dereferences the value.

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more