Skip to main content

IntervalPositiveLengthTrait

Trait IntervalPositiveLengthTrait 

Source
pub trait IntervalPositiveLengthTrait: IntervalTrait { }
Expand description

Marker trait for intervals with strictly positive length.

This trait unifies:

  • finite intervals with positive length (a < b), and
  • unbounded intervals with infinite length.

It intentionally excludes singleton intervals ({a}), whose length is zero.

§Relationship with Other Traits

  • Every bounded, finite interval with positive length implements this trait.
  • Every unbounded interval implements this trait.
  • It is a cross-cutting marker, so the relationships form a lattice rather than a strict tree.
  • Singleton intervals do not implement this trait.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§