Enum ropey::Error [−][src]
#[non_exhaustive] pub enum Error { ByteIndexOutOfBounds(usize, usize), CharIndexOutOfBounds(usize, usize), LineIndexOutOfBounds(usize, usize), Utf16IndexOutOfBounds(usize, usize), CharRangeInvalid(usize, usize), CharRangeOutOfBounds(Option<usize>, Option<usize>, usize), }
Expand description
Ropey’s error type.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Indicates that the passed byte index was out of bounds.
Contains the index attempted and the actual length of the
Rope
/RopeSlice
in bytes, in that order.
Indicates that the passed char index was out of bounds.
Contains the index attempted and the actual length of the
Rope
/RopeSlice
in chars, in that order.
Indicates that the passed line index was out of bounds.
Contains the index attempted and the actual length of the
Rope
/RopeSlice
in lines, in that order.
Indicates that the passed utf16 code-unit index was out of bounds.
Contains the index attempted and the actual length of the
Rope
/RopeSlice
in utf16 code units, in that order.
Indicates that a reversed char-index range (end < start) was encountered.
Contains the [start, end) char indices of the range, in that order.
Indicates that the passed char-index range was partially or fully out of bounds.
Contains the [start, end) char indices of the range and the actual
length of the Rope
/RopeSlice
in chars, in that order. When
either the start or end are None
, that indicates a half-open range.
Trait Implementations
The lower-level source of this error, if any. Read more
use the Display impl or to_string()
replaced by Error::source, which can support downcasting
Auto Trait Implementations
impl RefUnwindSafe for Error
impl UnwindSafe for Error
Blanket Implementations
Mutably borrows from an owned value. Read more