pub struct Coalescer { /* private fields */ }Expand description
The coalescing machine. See the module doc for the laws it encodes.
Implementations§
Source§impl Coalescer
impl Coalescer
Sourcepub fn new(quiet: Duration) -> Self
pub fn new(quiet: Duration) -> Self
A machine with the given semantic quiet window (the named CLI parameter; 100 ms is the declared, visible default at the CLI).
Sourcepub fn relevant_event(&mut self, now: Instant) -> Directive
pub fn relevant_event(&mut self, now: Instant) -> Directive
One relevant filesystem event at now: opens a burst or resets THE
deadline of the open one; during a build it marks the newer
generation dirty.
Sourcepub fn quiet_deadline_elapsed(&mut self, now: Instant) -> Directive
pub fn quiet_deadline_elapsed(&mut self, now: Instant) -> Directive
THE quiet deadline fired at now. A stale firing (the deadline was
re-armed after this firing was scheduled) is recognized by time and
ignored; a ripe firing starts the build the burst already made
dirty — expiry never discovers work, it starts known work.
Sourcepub fn build_completed(
&mut self,
completed: BuildGeneration,
now: Instant,
) -> [Directive; 2]
pub fn build_completed( &mut self, completed: BuildGeneration, now: Instant, ) -> [Directive; 2]
The in-flight build for generation completed (successfully or
not — candidate handling is the caller’s; this machine only decides
staleness and follow-up scheduling).
Sourcepub fn watcher_desynchronized(&mut self, now: Instant) -> Directive
pub fn watcher_desynchronized(&mut self, now: Instant) -> Directive
The watcher reported loss (overflow/desynchronization): the backend no longer promises completeness, so the caller takes ONE full content snapshot and rebuilds it — immediately, not debounced; the loss already coalesced everything it swallowed. During a build the snapshot rebuild becomes the (ripe) follow-up.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Coalescer
impl RefUnwindSafe for Coalescer
impl Send for Coalescer
impl Sync for Coalescer
impl Unpin for Coalescer
impl UnsafeUnpin for Coalescer
impl UnwindSafe for Coalescer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
T in a tonic::Request