Struct source_map_mappings::Mappings
[−]
[src]
pub struct Mappings<O = ()> where
O: Observer, { /* 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_source(&mut self, source: u32) -> &[Mapping]
[src]
Get the set of mappings that have original location information for the given source and ordered by original location.
fn by_original_location(
&mut self
) -> ByOriginalLocation<O::SortByOriginalLocation>
[src]
&mut self
) -> ByOriginalLocation<O::SortByOriginalLocation>
Iterate over all mappings that contain original location information, sorted by their original location information.
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.
Trait Implementations
impl<O: Debug> Debug for Mappings<O> where
O: Observer,
O::SortByOriginalLocation: Debug,
[src]
O: Observer,
O::SortByOriginalLocation: Debug,