Struct rustc_span::CachingSourceMapView
source · [−]pub struct CachingSourceMapView<'sm> {
source_map: &'sm SourceMap,
line_cache: [CacheEntry; 3],
time_stamp: usize,
}
Fields
source_map: &'sm SourceMap
line_cache: [CacheEntry; 3]
time_stamp: usize
Implementations
sourceimpl<'sm> CachingSourceMapView<'sm>
impl<'sm> CachingSourceMapView<'sm>
pub fn new(source_map: &'sm SourceMap) -> CachingSourceMapView<'sm>
pub fn byte_pos_to_line_and_col(
&mut self,
pos: BytePos
) -> Option<(Lrc<SourceFile>, usize, BytePos)>
pub fn span_data_to_lines_and_cols(
&mut self,
span_data: &SpanData
) -> Option<(Lrc<SourceFile>, usize, BytePos, usize, BytePos)>
fn cache_entry_index(&self, pos: BytePos) -> isize
fn oldest_cache_entry_index(&self) -> usize
fn oldest_cache_entry_index_avoid(&self, avoid_idx: usize) -> usize
fn file_for_position(&self, pos: BytePos) -> Option<(Lrc<SourceFile>, usize)>
Trait Implementations
sourceimpl<'sm> Clone for CachingSourceMapView<'sm>
impl<'sm> Clone for CachingSourceMapView<'sm>
sourcefn clone(&self) -> CachingSourceMapView<'sm>
fn clone(&self) -> CachingSourceMapView<'sm>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations
impl<'sm> !RefUnwindSafe for CachingSourceMapView<'sm>
impl<'sm> !Send for CachingSourceMapView<'sm>
impl<'sm> !Sync for CachingSourceMapView<'sm>
impl<'sm> Unpin for CachingSourceMapView<'sm>
impl<'sm> !UnwindSafe for CachingSourceMapView<'sm>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 136 bytes