Struct mz_timely_util::probe::Handle
source · pub struct Handle<T: Timestamp> {
frontier: Rc<RefCell<MutableAntichain<T>>>,
handle_frontier: Antichain<T>,
notify: Rc<Notify>,
}
Fields§
§frontier: Rc<RefCell<MutableAntichain<T>>>
The overall shared frontier managed by all the handles
handle_frontier: Antichain<T>
The private frontier containing the changes produced by this handle only
notify: Rc<Notify>
Implementations§
source§impl<T: Timestamp> Handle<T>
impl<T: Timestamp> Handle<T>
sourcepub async fn progressed(&self)
pub async fn progressed(&self)
Wait for the frontier monitored by this probe to progress
sourcepub fn less_than(&self, time: &T) -> bool
pub fn less_than(&self, time: &T) -> bool
Returns true iff the frontier is strictly less than time
.
sourcepub fn less_equal(&self, time: &T) -> bool
pub fn less_equal(&self, time: &T) -> bool
Returns true iff the frontier is less than or equal to time
.
sourcepub fn with_frontier<R, F: FnMut(AntichainRef<'_, T>) -> R>(
&self,
function: F,
) -> R
pub fn with_frontier<R, F: FnMut(AntichainRef<'_, T>) -> R>( &self, function: F, ) -> R
Invokes a method on the frontier, returning its result.
This method allows inspection of the frontier, which cannot be returned by reference as
it is on the other side of a RefCell
.
§Examples
use mz_timely_util::probe::Handle;
let handle = Handle::<usize>::default();
let frontier = handle.with_frontier(|frontier| frontier.to_vec());
fn update_frontier(&mut self, new_frontier: &[T])
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Handle<T>where
T: Freeze,
impl<T> !RefUnwindSafe for Handle<T>
impl<T> !Send for Handle<T>
impl<T> !Sync for Handle<T>
impl<T> Unpin for Handle<T>where
T: Unpin,
impl<T> !UnwindSafe for Handle<T>
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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> ProgressEventTimestamp for T
impl<T> ProgressEventTimestamp for T
source§impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
source§fn plus_equals(&mut self, rhs: &&'a S)
fn plus_equals(&mut self, rhs: &&'a S)
The method of
std::ops::AddAssign
, for types that do not implement AddAssign
.