pub struct Document { /* private fields */ }Expand description
A typed view of a complete NAMESPACE document.
Implementations§
Source§impl Document
impl Document
Sourcepub fn syntax(&self) -> &SyntaxNode
pub fn syntax(&self) -> &SyntaxNode
The underlying lossless R root, including all trivia.
Sourcepub fn entries(&self) -> impl Iterator<Item = Entry> + use<>
pub fn entries(&self) -> impl Iterator<Item = Entry> + use<>
Directive and malformed entries in source order.
Braced groups, assignments, and both conditional branches are traversed as namespace containers. Conditions themselves are never evaluated and calls inside a condition or directive argument are not promoted.
Sourcepub fn directives(&self) -> impl Iterator<Item = Directive> + use<>
pub fn directives(&self) -> impl Iterator<Item = Directive> + use<>
Every directive in source order, including unsupported directives.
Trait Implementations§
impl Eq for Document
impl StructuralPartialEq for Document
Auto Trait Implementations§
impl !RefUnwindSafe for Document
impl !Send for Document
impl !Sync for Document
impl !UnwindSafe for Document
impl Freeze for Document
impl Unpin for Document
impl UnsafeUnpin for Document
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