pub trait IterContainer {
type ItemRef<'a>
where Self: 'a;
type Iter<'a>: Iterator<Item = Self::ItemRef<'a>>
where Self: 'a;
// Required method
fn iter(&self) -> Self::Iter<'_>;
}
Expand description
A container that allows iteration morally equivalent to IntoIterator
.
Iterating the container presents items in an implementation-specific order. The container’s contents are not changed.
Required Associated Types§
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.