BoundedRange

Trait BoundedRange 

Source
pub trait BoundedRange {
    type Index: IntBound;

    // Required methods
    fn start(&self) -> Self::Index;
    fn end(&self) -> Self::Index;

    // Provided method
    fn distance(&self) -> Self::Index { ... }
}
Expand description

A definition of a bounded range.

Required Associated Types§

Required Methods§

Source

fn start(&self) -> Self::Index

Source

fn end(&self) -> Self::Index

Provided Methods§

Source

fn distance(&self) -> Self::Index

Implementations on Foreign Types§

Source§

impl<T: IntBound> BoundedRange for Range<T>

Source§

type Index = T

Source§

fn start(&self) -> Self::Index

Source§

fn end(&self) -> Self::Index

Source§

impl<T: IntBound> BoundedRange for RangeInclusive<T>

Source§

type Index = T

Source§

fn start(&self) -> Self::Index

Source§

fn end(&self) -> Self::Index

Source§

impl<T: IntBound> BoundedRange for RangeTo<T>

Source§

type Index = T

Source§

fn start(&self) -> Self::Index

Source§

fn end(&self) -> Self::Index

Source§

impl<T: IntBound> BoundedRange for RangeToInclusive<T>

Source§

type Index = T

Source§

fn start(&self) -> Self::Index

Source§

fn end(&self) -> Self::Index

Implementors§