pub struct SourceFile { /* private fields */ }Implementations§
Source§impl SourceFile
impl SourceFile
pub fn parse(source: &str) -> Self
pub fn source(&self) -> &str
pub const fn module(&self) -> &Module
pub fn diagnostics(&self) -> &[Diagnostic]
pub const fn line_index(&self) -> &LineIndex
pub fn tokens(&self) -> &[Token]
pub fn trivia(&self) -> &[Trivia]
pub fn laid_out_tokens(&self) -> &[Token]
pub fn parser_span_to_text_range(&self, span: ParserSpan) -> TextRange
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SourceFile
impl RefUnwindSafe for SourceFile
impl Send for SourceFile
impl Sync for SourceFile
impl Unpin for SourceFile
impl UnsafeUnpin for SourceFile
impl UnwindSafe for SourceFile
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