pub trait IterShadows {
type IterShadows: Iterator<Item = Self>;
// Required method
fn iter_shadows(&self) -> Self::IterShadows;
}
Expand description
A type whose values can “shadow” other values of the type.
An implementation of this trait defines a relationship between values of the
type. For any value s: S
, if t
appears in
IterShadows::iter_shadows(s)
, then s
shadows t
.
This “shadows” relationship is similar to PartialOrd
in that certain
propreties must hold:
- transitivity: if
s.iter_shadows()
yieldst
, andt.iter_shadows()
yieldsu
, thens.iter_shadows()
must also yieldu
. - anticyclic:
s
cannot shadow itself.
Produces an iterator that yields all the shadows of a given value. The order of iteration is unspecified.
Required Associated Types§
Sourcetype IterShadows: Iterator<Item = Self>
type IterShadows: Iterator<Item = Self>
The iterator returned by iter_shadows
.
Required Methods§
Sourcefn iter_shadows(&self) -> Self::IterShadows
fn iter_shadows(&self) -> Self::IterShadows
Produces the iterator for shadow values.