pub trait Track: Surfaces {
type Call: Call;
// Required methods
fn call(&self, call: &Self::Call) -> u128;
fn call_mut(&mut self, call: &Self::Call);
// Provided methods
fn track(&self) -> Tracked<'_, Self> { ... }
fn track_mut(&mut self) -> TrackedMut<'_, Self> { ... }
fn track_with<'a>(
&'a self,
sink: &'a dyn Sink<Call = Self::Call>,
) -> Tracked<'a, Self> { ... }
fn track_mut_with<'a>(
&'a mut self,
sink: &'a dyn Sink<Call = Self::Call>,
) -> TrackedMut<'a, Self> { ... }
}Expand description
A trackable type.
This is implemented by types that have an implementation block annotated
with #[track] and for trait objects whose traits are annotated with
#[track]. For more details, see its documentation.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn track_mut(&mut self) -> TrackedMut<'_, Self>
fn track_mut(&mut self) -> TrackedMut<'_, Self>
Start tracking all accesses and mutations to a value.
Sourcefn track_with<'a>(
&'a self,
sink: &'a dyn Sink<Call = Self::Call>,
) -> Tracked<'a, Self>
fn track_with<'a>( &'a self, sink: &'a dyn Sink<Call = Self::Call>, ) -> Tracked<'a, Self>
Start tracking all accesses into a sink.
Sourcefn track_mut_with<'a>(
&'a mut self,
sink: &'a dyn Sink<Call = Self::Call>,
) -> TrackedMut<'a, Self>
fn track_mut_with<'a>( &'a mut self, sink: &'a dyn Sink<Call = Self::Call>, ) -> TrackedMut<'a, Self>
Start tracking all accesses and mutations into a sink.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.