pub struct IndexedConsumer {
pub source_map: SourceMapJson,
/* private fields */
}Fields§
§source_map: SourceMapJsonImplementations§
Source§impl IndexedConsumer
impl IndexedConsumer
pub fn new(source_map_raw: &str, source_map_url: Option<&str>) -> Self
pub fn from_source_map_json( source_map: SourceMapJson, source_map_url: Option<&str>, ) -> Self
Sourcepub fn get_sources(&self) -> Vec<String>
pub fn get_sources(&self) -> Vec<String>
The list of original sources.
pub fn original_position_for( &mut self, input: Position, bias: Option<Bias>, ) -> Option<Mapping>
Sourcepub fn has_contents_of_all_sources(&self) -> bool
pub fn has_contents_of_all_sources(&self) -> bool
Return true if we have the source content for every source in the source map, false otherwise.
Sourcepub fn source_content_for(
&mut self,
source: &str,
panic_on_missing: Option<bool>,
) -> Option<String>
pub fn source_content_for( &mut self, source: &str, panic_on_missing: Option<bool>, ) -> Option<String>
Returns the original source content. The only argument is the url of the original source file. Returns null if no original source content is available.
Sourcepub fn generated_position_for(
&mut self,
source: &str,
original_line: i32,
original_column: i32,
bias: Option<Bias>,
) -> Option<Position>
pub fn generated_position_for( &mut self, source: &str, original_line: i32, original_column: i32, bias: Option<Bias>, ) -> Option<Position>
Returns the generated line and column information for the original source, line, and column positions provided. The only argument is an object with the following properties:
pub fn all_generated_position_for( &mut self, source: &str, original_line: i32, original_column: Option<i32>, ) -> Vec<Mapping>
pub fn computed_column_spans(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IndexedConsumer
impl !RefUnwindSafe for IndexedConsumer
impl !Send for IndexedConsumer
impl !Sync for IndexedConsumer
impl Unpin for IndexedConsumer
impl !UnwindSafe for IndexedConsumer
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