Struct FusionObservation
pub struct FusionObservation { /* private fields */ }Expand description
Watches the fusion server for as long as it lives.
Process-wide, like the server it watches: operations reach it from every device and every thread that records them. Several observations can be live at once — each observer sees every notification while it is installed, and each guard removes only its own, whatever order they drop in. A block’s start and end reach the same observers: one installed while a block runs first hears of the next one, and one removed while a block runs still hears it end, after its guard has dropped.
The server notifies an observer as it processes a call, which lags the
call that recorded it: an operation recorded just before the guard drops
can be processed after, and one recorded before the guard was created can
be processed while it lives. To bracket a region of the program, sync the
devices it runs on (Backend::sync) before
creating the guard and again before dropping it.
Implementations§
§impl FusionObservation
impl FusionObservation
pub fn new(observer: Arc<dyn FusionObserver>) -> FusionObservation
pub fn new(observer: Arc<dyn FusionObserver>) -> FusionObservation
Installs observer until the guard drops.
Trait Implementations§
§impl Debug for FusionObservation
impl Debug for FusionObservation
§impl Drop for FusionObservation
impl Drop for FusionObservation
Auto Trait Implementations§
impl Freeze for FusionObservation
impl RefUnwindSafe for FusionObservation
impl Send for FusionObservation
impl Sync for FusionObservation
impl Unpin for FusionObservation
impl UnsafeUnpin for FusionObservation
impl UnwindSafe for FusionObservation
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
§impl<K, Q> Comparable<Q> for K
impl<K, Q> Comparable<Q> for K
§impl<K, Q> Equivalent<Q> for K
impl<K, Q> Equivalent<Q> for K
§fn equivalent(&self, key: &Q) -> bool
fn equivalent(&self, key: &Q) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more