Trait core::ops::OneSidedRange

source ·
pub trait OneSidedRange<T: ?Sized>: RangeBounds<T> { }
🔬This is a nightly-only experimental API. (one_sided_range #69780)
Expand description

OneSidedRange 是为一侧无界的内置范围类型实现的。 例如,a....b..=c 实现了 OneSidedRange,而 ..d..ef..=g 则没有。

实现 OneSidedRange<T> 的类型必须从 RangeBounds::start_boundRangeBounds::end_bound 之一返回 Bound::Unbounded

Implementors§

source§

impl<T> OneSidedRange<T> for RangeFrom<T>where Self: RangeBounds<T>,

source§

impl<T> OneSidedRange<T> for RangeTo<T>where Self: RangeBounds<T>,

source§

impl<T> OneSidedRange<T> for RangeToInclusive<T>where Self: RangeBounds<T>,