pub enum SourceMapError {
InvalidVersion(u8),
MissingField(&'static str),
InvalidVlq {
position: usize,
message: String,
},
InvalidMapping {
line: u32,
column: u32,
message: String,
},
JsonError(Error),
IoError(Error),
IndexOutOfBounds {
index: usize,
length: usize,
},
InvalidSourceIndex(usize),
InvalidNameIndex(usize),
CompositionError(String),
}Expand description
Error type for source map operations.
Variants§
InvalidVersion(u8)
Invalid source map version.
MissingField(&'static str)
Missing required field.
InvalidVlq
Invalid VLQ encoding.
InvalidMapping
Invalid mapping.
JsonError(Error)
JSON parsing error.
IoError(Error)
IO error.
IndexOutOfBounds
Index out of bounds.
InvalidSourceIndex(usize)
Invalid source index.
InvalidNameIndex(usize)
Invalid name index.
CompositionError(String)
Source map composition error.
Implementations§
Source§impl SourceMapError
impl SourceMapError
Sourcepub fn invalid_vlq(position: usize, message: impl Into<String>) -> Self
pub fn invalid_vlq(position: usize, message: impl Into<String>) -> Self
Creates a new invalid VLQ error.
Sourcepub fn invalid_mapping(
line: u32,
column: u32,
message: impl Into<String>,
) -> Self
pub fn invalid_mapping( line: u32, column: u32, message: impl Into<String>, ) -> Self
Creates a new invalid mapping error.
Sourcepub fn index_out_of_bounds(index: usize, length: usize) -> Self
pub fn index_out_of_bounds(index: usize, length: usize) -> Self
Creates a new index out of bounds error.
Trait Implementations§
Source§impl Debug for SourceMapError
impl Debug for SourceMapError
Source§impl Display for SourceMapError
impl Display for SourceMapError
Source§impl Error for SourceMapError
impl Error for SourceMapError
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<Error> for SourceMapError
impl From<Error> for SourceMapError
Auto Trait Implementations§
impl Freeze for SourceMapError
impl !RefUnwindSafe for SourceMapError
impl Send for SourceMapError
impl Sync for SourceMapError
impl Unpin for SourceMapError
impl UnsafeUnpin for SourceMapError
impl !UnwindSafe for SourceMapError
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