pub struct ReadinessGate { /* private fields */ }Expand description
Aggregates multiple components into a single readiness latch.
The gate becomes “ready” once required components have called component_started().
Implementations§
Source§impl ReadinessGate
impl ReadinessGate
Sourcepub fn with_on_ready(
self,
on_ready: Arc<dyn Fn() + Send + Sync + 'static>,
) -> Self
pub fn with_on_ready( self, on_ready: Arc<dyn Fn() + Send + Sync + 'static>, ) -> Self
Install an on_ready callback invoked once when the gate becomes ready.
Sourcepub fn token(self: &Arc<Self>) -> ReadinessToken
pub fn token(self: &Arc<Self>) -> ReadinessToken
Produce a token to be handed to a component/thread.
Auto Trait Implementations§
impl !Freeze for ReadinessGate
impl !RefUnwindSafe for ReadinessGate
impl Send for ReadinessGate
impl Sync for ReadinessGate
impl Unpin for ReadinessGate
impl !UnwindSafe for ReadinessGate
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