pub trait Observer<'i, T: ?Sized>: DerefMut<Target = T> {
// Required methods
fn observe(value: &'i mut T) -> Self;
fn collect<A: Adapter>(this: Self) -> Result<Option<Mutation<A>>, A::Error>
where T: Serialize;
}Expand description
A trait for observer types that wrap and track mutations to values.
Observers provide transparent access to the underlying value while recording any mutations that occur.
Required Methods§
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.