netstack3_base::socketmap

Trait IterShadows

Source
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:

  1. transitivity: if s.iter_shadows() yields t, and t.iter_shadows() yields u, then s.iter_shadows() must also yield u.
  2. 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§

Source

type IterShadows: Iterator<Item = Self>

The iterator returned by iter_shadows.

Required Methods§

Source

fn iter_shadows(&self) -> Self::IterShadows

Produces the iterator for shadow values.

Implementors§