pub trait IntoIteratorAssertions<T: Debug> {
// Required methods
fn into_iter_contains<E>(self, expected: E) -> Self
where E: Debug,
T: AssertrPartialEq<E>;
fn into_iter_contains_exactly<E>(self, expected: impl AsRef<[E]>) -> Self
where E: Debug,
T: PartialEq<E> + AssertrPartialEq<E> + Debug;
fn into_iter_iterator_is_empty(self) -> Self;
}Expand description
Assertions for any type convertable to some Iterator using the IntoIterator trait.
Assertions partly match the known assertions for slices, as an iterator can roughly be seen as
a collection (simply without random access to it and only the possibility to iterate once).
Assertions are prefixed to distinguish these assertions from more concrete implementations
on the actual type, like Vec for example.
Required Methods§
fn into_iter_contains<E>(self, expected: E) -> Selfwhere
E: Debug,
T: AssertrPartialEq<E>,
fn into_iter_contains_exactly<E>(self, expected: impl AsRef<[E]>) -> Self
fn into_iter_iterator_is_empty(self) -> Self
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.