pub enum SourceRangeError {
UnrepresentableOffset {
offset: usize,
max: usize,
},
OffsetOutOfBounds {
offset: ByteOffset,
len: ByteOffset,
},
ReversedRange {
start: ByteOffset,
end: ByteOffset,
},
SourceMismatch {
expected: SourceId,
actual: SourceId,
},
SourceTooLarge {
len: usize,
max: usize,
},
TooManySources,
}Expand description
Failure to create or use a source coordinate or retain another source.
Variants§
UnrepresentableOffset
A host byte index cannot be represented by the compiler coordinate type.
OffsetOutOfBounds
A byte offset is beyond the exclusive end of a source document.
ReversedRange
The start of a range follows its end.
SourceMismatch
A range identifies a different source document.
SourceTooLarge
Source byte offsets must fit in the compiler’s u32 coordinate space.
TooManySources
All representable compilation-local IDs have been allocated.
Trait Implementations§
Source§impl Clone for SourceRangeError
impl Clone for SourceRangeError
Source§fn clone(&self) -> SourceRangeError
fn clone(&self) -> SourceRangeError
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 SourceRangeError
Source§impl Debug for SourceRangeError
impl Debug for SourceRangeError
Source§impl Display for SourceRangeError
impl Display for SourceRangeError
impl Eq for SourceRangeError
Source§impl Error for SourceRangeError
impl Error for SourceRangeError
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 From<SourceRangeError> for DiagnosticReportError
impl From<SourceRangeError> for DiagnosticReportError
Source§fn from(source: SourceRangeError) -> Self
fn from(source: SourceRangeError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SourceRangeError
impl PartialEq for SourceRangeError
impl StructuralPartialEq for SourceRangeError
Auto Trait Implementations§
impl Freeze for SourceRangeError
impl RefUnwindSafe for SourceRangeError
impl Send for SourceRangeError
impl Sync for SourceRangeError
impl Unpin for SourceRangeError
impl UnsafeUnpin for SourceRangeError
impl UnwindSafe for SourceRangeError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.