Struct sourcefile::SourceFile [−][src]
pub struct SourceFile { pub contents: String, // some fields omitted }
Expand description
A concatenated string of files, with sourcemap information.
Fields
contents: String
The full contents of all the files
Implementations
Concatenate a file to the end of contents
, and record info needed to resolve spans.
If the last line doesn’t end with a newline character, it will still be a ‘line’ for the purposes of this calculation.
Get the file, line, and col position of a byte offset.
Panics
This function will panic if offset
is not on a character boundary.
Trait Implementations
Returns the “default value” for a type. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for SourceFile
impl Send for SourceFile
impl Sync for SourceFile
impl Unpin for SourceFile
impl UnwindSafe for SourceFile
Blanket Implementations
Mutably borrows from an owned value. Read more