Skip to main content

SerializeObserverExt

Trait SerializeObserverExt 

Source
pub trait SerializeObserverExt<'ob>: SerializeObserver<'ob> {
    // Provided method
    fn flush<A: Adapter>(&mut self) -> Result<A, A::Error> { ... }
}
Expand description

Extension trait providing ergonomic methods for SerializeObserver.

This trait is automatically implemented for all types that implement SerializeObserver and provides convenient methods that don’t require turbofish syntax.

Provided Methods§

Source

fn flush<A: Adapter>(&mut self) -> Result<A, A::Error>

Collects mutations using the specified adapter.

This is a convenience method that calls SerializeObserver::flush.

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.

Implementors§

Source§

impl<'ob, T: SerializeObserver<'ob>> SerializeObserverExt<'ob> for T