Skip to main content

TiRangeBounds

Trait TiRangeBounds 

Source
pub trait TiRangeBounds<K> {
    type Range: RangeBounds<usize>;

    // Required method
    fn into_range(self) -> Self::Range;
}
Expand description

A helper trait used to convert typed index ranges to usize ranges. The trait is implemented for Rust’s built-in range types with K where usize: From<K> used as bound endpoints.

See core::ops::RangeBounds for more details.

Required Associated Types§

Source

type Range: RangeBounds<usize>

Appropriate usize range

Required Methods§

Source

fn into_range(self) -> Self::Range

Converts the TiRangeBounds into an appropriate usize range.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<K> TiRangeBounds<K> for (Bound<K>, Bound<K>)
where usize: From<K>,

Source§

impl<K> TiRangeBounds<K> for Range<K>
where usize: From<K>,

Source§

impl<K> TiRangeBounds<K> for RangeFrom<K>
where usize: From<K>,

Source§

impl<K> TiRangeBounds<K> for RangeFull
where usize: From<K>,

Source§

impl<K> TiRangeBounds<K> for RangeInclusive<K>
where usize: From<K>,

Source§

impl<K> TiRangeBounds<K> for RangeTo<K>
where usize: From<K>,

Source§

impl<K> TiRangeBounds<K> for RangeToInclusive<K>
where usize: From<K>,

Implementors§