pub trait TextRange: Clone {
// Required method
fn to_range(self, max: usize) -> Range<usize>;
}Expand description
Ranges that can be used to index the Text
All of the ranges in std that implement either
RangeBounds<usize> or RangeBounds<Point> should work as an
argument. If it implements RangeBounds<usize>, then the
usize represents the a byte index in the Text.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.