pub enum SegmentError {
LineNumberMustBeOneBased {
start_line: usize,
end_line: usize,
},
StartAfterEnd {
start_line: usize,
end_line: usize,
},
}Expand description
Errors emitted when constructing a LineSegment.
Variants§
LineNumberMustBeOneBased
Line numbers must be one-based (line 0 is invalid).
StartAfterEnd
The segment start must not occur after its end.
Trait Implementations§
Source§impl Clone for SegmentError
impl Clone for SegmentError
Source§fn clone(&self) -> SegmentError
fn clone(&self) -> SegmentError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SegmentError
Source§impl Debug for SegmentError
impl Debug for SegmentError
Source§impl Display for SegmentError
impl Display for SegmentError
impl Eq for SegmentError
Source§impl Error for SegmentError
impl Error for SegmentError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for SegmentError
impl PartialEq for SegmentError
impl StructuralPartialEq for SegmentError
Auto Trait Implementations§
impl Freeze for SegmentError
impl RefUnwindSafe for SegmentError
impl Send for SegmentError
impl Sync for SegmentError
impl Unpin for SegmentError
impl UnsafeUnpin for SegmentError
impl UnwindSafe for SegmentError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more