struct SourceMapInner {
used_address_space: u32,
source_files: Vec<Rc<SourceFile>>,
}
Expand description
Actual data of the source map. We use this setup for purposes of interior mutability.
Fields§
§used_address_space: u32
The address space below this value is currently used by the files in the source map.
source_files: Vec<Rc<SourceFile>>
All the source files recorded thus far.
The list is append-only with mappings from the start byte position
for fast lookup from a Span
to its SourceFile
.
Implementations§
Source§impl SourceMapInner
impl SourceMapInner
Sourcefn try_allocate_address_space(&mut self, size: u32) -> Option<BytePos>
fn try_allocate_address_space(&mut self, size: u32) -> Option<BytePos>
Attempt reserving address space for size
number of bytes.
Trait Implementations§
Source§impl Default for SourceMapInner
impl Default for SourceMapInner
Source§fn default() -> SourceMapInner
fn default() -> SourceMapInner
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SourceMapInner
impl RefUnwindSafe for SourceMapInner
impl !Send for SourceMapInner
impl !Sync for SourceMapInner
impl Unpin for SourceMapInner
impl UnwindSafe for SourceMapInner
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more