pub struct Segment {
pub generated_column: i32,
pub source_index: Option<i32>,
pub original_line: Option<i32>,
pub original_column: Option<i32>,
pub name_index: Option<i32>,
}Expand description
A segment in the mappings string.
Segments are separated by commas within a line.
Fields§
§generated_column: i32Generated column (relative to previous segment on same line).
source_index: Option<i32>Source index (relative to previous segment, if present).
original_line: Option<i32>Original line (relative to previous segment, if present).
original_column: Option<i32>Original column (relative to previous segment, if present).
name_index: Option<i32>Name index (relative to previous segment, if present).
Implementations§
Source§impl Segment
impl Segment
Sourcepub fn generated_only(column: i32) -> Self
pub fn generated_only(column: i32) -> Self
Creates a new segment with only generated column.
Sourcepub fn full(
generated_column: i32,
source_index: i32,
original_line: i32,
original_column: i32,
name_index: Option<i32>,
) -> Self
pub fn full( generated_column: i32, source_index: i32, original_line: i32, original_column: i32, name_index: Option<i32>, ) -> Self
Creates a new full segment.
Sourcepub fn has_source(&self) -> bool
pub fn has_source(&self) -> bool
Checks if this segment has source information.
Trait Implementations§
impl Copy for Segment
impl Eq for Segment
impl StructuralPartialEq for Segment
Auto Trait Implementations§
impl Freeze for Segment
impl RefUnwindSafe for Segment
impl Send for Segment
impl Sync for Segment
impl Unpin for Segment
impl UnsafeUnpin for Segment
impl UnwindSafe for Segment
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