pub enum SignalValidationError {
OutOfBounds {
signal_id: SignalId,
end: usize,
text_len: usize,
},
InvalidSpan {
signal_id: SignalId,
start: usize,
end: usize,
},
TextMismatch {
signal_id: SignalId,
expected: String,
actual: String,
start: usize,
end: usize,
},
}Expand description
Validation error for a signal.
Variants§
OutOfBounds
Signal’s end offset exceeds text length.
Fields
InvalidSpan
Signal has invalid span (start >= end).
TextMismatch
Signal’s surface text doesn’t match text at offsets.
Trait Implementations§
Source§impl Clone for SignalValidationError
impl Clone for SignalValidationError
Source§fn clone(&self) -> SignalValidationError
fn clone(&self) -> SignalValidationError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SignalValidationError
impl Debug for SignalValidationError
Source§impl Display for SignalValidationError
impl Display for SignalValidationError
Source§impl Error for SignalValidationError
impl Error for SignalValidationError
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 SignalValidationError
impl PartialEq for SignalValidationError
impl StructuralPartialEq for SignalValidationError
Auto Trait Implementations§
impl Freeze for SignalValidationError
impl RefUnwindSafe for SignalValidationError
impl Send for SignalValidationError
impl Sync for SignalValidationError
impl Unpin for SignalValidationError
impl UnsafeUnpin for SignalValidationError
impl UnwindSafe for SignalValidationError
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