kvarn_async::prelude::compact_str::core::range

Struct RangeFull

source
pub struct RangeFull;
🔬This is a nightly-only experimental API. (new_range_api)
Expand description

An unbounded range (..).

RangeFull is primarily used as a slicing index, its shorthand is ... It cannot serve as an Iterator because it doesn’t have a starting point.

§Examples

The .. syntax is a RangeFull:

assert_eq!(.., std::ops::RangeFull);

It does not have an IntoIterator implementation, so you can’t use it in a for loop directly. This won’t compile:

ⓘ
for i in .. {
    // ...
}

Used as a