pub struct Document(/* private fields */);Implementations§
Source§impl Document
impl Document
Sourcepub fn records(&self) -> impl Iterator<Item = Record> + use<>
pub fn records(&self) -> impl Iterator<Item = Record> + use<>
The document’s records, in order. A DESCRIPTION has exactly one.
Sourcepub fn first_record(&self) -> Option<Record>
pub fn first_record(&self) -> Option<Record>
The first record, if any.
Sourcepub fn fields(&self) -> impl Iterator<Item = Field> + use<>
pub fn fields(&self) -> impl Iterator<Item = Field> + use<>
Every field of every record, in document order.
This is the record-blind view, and it is deliberately what the
DESCRIPTION readers use: a stray blank line splits the file into two
records, and must not hide the fields after it from a caller that only
wants “the Version of this package”.
Trait Implementations§
Source§impl AstNode for Document
impl AstNode for Document
type Language = DcfLanguage
fn can_cast(kind: SyntaxKind) -> bool
fn cast(syntax: SyntaxNode) -> Option<Self>
fn syntax(&self) -> &SyntaxNode
fn clone_subtree(&self) -> Selfwhere
Self: Sized,
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