Struct source_map_mappings::Mappings
[−]
[src]
pub struct Mappings<O = ()> { /* fields omitted */ }
A parsed set of mappings that can be queried.
Constructed via parse_mappings.
Methods
impl<O: Observer> Mappings<O>[src]
fn by_generated_location(&self) -> &[Mapping][src]
Get the full set of mappings, ordered by generated location.
fn compute_column_spans(&mut self)[src]
Compute the last generated column of each mapping.
After this method has been called, any mappings with
last_generated_column == None means that the mapping spans to the end
of the line.
fn by_original_location(&mut self) -> &[Mapping][src]
Get the set of mappings that have original location information, ordered by original location.
fn original_location_for(
&self,
generated_line: u32,
generated_column: u32,
bias: Bias
) -> Option<&Mapping>[src]
&self,
generated_line: u32,
generated_column: u32,
bias: Bias
) -> Option<&Mapping>
Get the mapping closest to the given generated location, if any exists.
fn generated_location_for(
&mut self,
source: u32,
original_line: u32,
original_column: u32,
bias: Bias
) -> Option<&Mapping>[src]
&mut self,
source: u32,
original_line: u32,
original_column: u32,
bias: Bias
) -> Option<&Mapping>
Get the mapping closest to the given original location, if any exists.
fn all_generated_locations_for(
&mut self,
source: u32,
original_line: u32,
original_column: Option<u32>
) -> AllGeneratedLocationsFor[src]
&mut self,
source: u32,
original_line: u32,
original_column: Option<u32>
) -> AllGeneratedLocationsFor
Get all mappings at the given original location.
If original_column is None, get all mappings on the given source and
original line regardless what columns they have. If original_column is
Some, only return mappings for which all of source, original line, and
original column match.