pub struct ParsedFile {
pub file: FileId,
pub version: u64,
pub tree: Arc<Tree>,
pub diagnostics: Vec<Diagnostic>,
pub adapter_id: LanguageId,
pub grammar_name: &'static str,
/* private fields */
}Fields§
§file: FileId§version: u64§tree: Arc<Tree>§diagnostics: Vec<Diagnostic>§adapter_id: LanguageId§grammar_name: &'static strExact adapter-selected grammar variant used for this source path.
Implementations§
Source§impl ParsedFile
impl ParsedFile
Sourcepub fn source_text(&self) -> &str
pub fn source_text(&self) -> &str
Original source text addressed by every byte range in Self::tree.
Consumers that interpret node byte ranges must use this text instead of taking a fresh VFS snapshot, which may already be a newer version. Grammar recovery can normalize a same-width private parser buffer, but that buffer is never exposed and cannot alter these source slices.
Trait Implementations§
Source§impl Clone for ParsedFile
impl Clone for ParsedFile
Source§fn clone(&self) -> ParsedFile
fn clone(&self) -> ParsedFile
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ParsedFile
impl RefUnwindSafe for ParsedFile
impl Send for ParsedFile
impl Sync for ParsedFile
impl Unpin for ParsedFile
impl UnsafeUnpin for ParsedFile
impl UnwindSafe for ParsedFile
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