Trait RowSet

Source
pub trait RowSet {
    type Target;
    type Item;

    // Required method
    fn get(&self) -> &Self::Target;
}
Available on crate feature wiremock only.
Expand description

An opaque snapshot produced by a RowSource

This trait represents an object that provides a fixed iterable collection on demand. In order to express the idea that a collection is iterable, and not consumed by being iterated over, we must describe it as having IntoIterator implemented for shared references. A RowSet in contrast is owned, so that the snapshot can be repeatedly iterated over, without being consumed or updated, as required.

Required Associated Types§

Source

type Target

The iterable collection type this provides.

Source

type Item

The type of the items in the collection this provides.

Required Methods§

Source

fn get(&self) -> &Self::Target

Produce a reference to an iterable collection.

Implementations on Foreign Types§

Source§

impl<T> RowSet for Arc<Vec<T>>

Source§

type Item = T

Source§

type Target = Vec<T>

Source§

fn get(&self) -> &Self::Target

Source§

impl<T> RowSet for Vec<T>

Source§

type Item = T

Source§

type Target = Vec<T>

Source§

fn get(&self) -> &Self::Target

Implementors§