#[non_exhaustive]pub enum Error<M: Measurable> {
IndexOutOfBounds(usize, usize),
MeasureOutOfBounds(M::Measure, M::Measure),
IndexRangeInvalid(usize, usize),
MeasureRangeInvalid(Option<M::Measure>, Option<M::Measure>),
IndexRangeOutOfBounds(Option<usize>, Option<usize>, usize),
MeasureRangeOutOfBounds(Option<M::Measure>, Option<M::Measure>, M::Measure),
}Expand description
AnyRope’s error type.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
IndexOutOfBounds(usize, usize)
Indicates that the passed index was out of bounds.
Contains the index attempted and the actual length of the
Rope<M>/RopeSlice<M>, in that order.
MeasureOutOfBounds(M::Measure, M::Measure)
Indicates that the passed measure was out of bounds.
Contains the index attempted and the actual measure of the
Rope<M>/RopeSlice<M>, in that order.
IndexRangeInvalid(usize, usize)
Indicates that a reversed index range (end < start) was encountered.
Contains the [start, end) indices of the range, in that order.
MeasureRangeInvalid(Option<M::Measure>, Option<M::Measure>)
Indicates that a reversed measure range (end < start) was encountered.
Contains the [start, end) measures of the range, in that order.
IndexRangeOutOfBounds(Option<usize>, Option<usize>, usize)
Indicates that the passed index range was partially or fully out of bounds.
Contains the [start, end) indices of the range and the actual
length of the Rope<M>/RopeSlice<M>, in that order.
When either the start or end are None, that indicates a half-open
range.
MeasureRangeOutOfBounds(Option<M::Measure>, Option<M::Measure>, M::Measure)
Indicates that the passed measure range was partially or fully out of bounds.
Contains the [start, end) measures of the range and the actual
measure of the Rope<M>/RopeSlice<M>, in that order.
When either the start or end are None, that indicates a half-open
range.