Trait Traversable

Source
pub trait Traversable {
    // Required method
    fn traverse<'a, E>(
        doc: &'a Document,
        f: impl FnMut(&'a Self) -> Result<(), E>,
    ) -> Result<(), E>
       where Self: 'a;
}
Expand description

A trait for types that can be enumerated in a Document. This is used to power the for_each and try_for_each functions.

Required Methods§

Source

fn traverse<'a, E>( doc: &'a Document, f: impl FnMut(&'a Self) -> Result<(), E>, ) -> Result<(), E>
where Self: 'a,

Run the function f on all elements of type Self in the document doc.

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§