pub struct Parsed { /* private fields */ }Expand description
A parsed Rd document, its diagnostics, and the source map for that exact parser snapshot. Equality intentionally compares only the document and diagnostics; use the explicit source-map projection when provenance is significant.
Implementations§
Source§impl Parsed
impl Parsed
pub fn document(&self) -> &RdDocument
pub fn diagnostics(&self) -> &[Diagnostic]
Sourcepub fn source_map(&self) -> &RdSourceMap
pub fn source_map(&self) -> &RdSourceMap
Returns the exact source map for this parsed document snapshot.
The map is tied to this parse result’s original input and uses exact canonical-path lookup. It is not a map for independently constructed or RDS-lowered ASTs.
Sourcepub fn into_parts(self) -> (RdDocument, Vec<Diagnostic>)
pub fn into_parts(self) -> (RdDocument, Vec<Diagnostic>)
Decomposes this parse result, intentionally discarding source-map provenance.
Sourcepub fn into_parts_with_source_map(
self,
) -> (RdDocument, Vec<Diagnostic>, RdSourceMap)
pub fn into_parts_with_source_map( self, ) -> (RdDocument, Vec<Diagnostic>, RdSourceMap)
Decomposes this parse result while retaining its source-map provenance.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Parsed
impl RefUnwindSafe for Parsed
impl Send for Parsed
impl Sync for Parsed
impl Unpin for Parsed
impl UnsafeUnpin for Parsed
impl UnwindSafe for Parsed
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