pub struct Document<'a> { /* private fields */ }Expand description
One C0DATA document: an optional SYN heading, a body, an optional EOT.
Document::new reads the first document in a buffer; use
Container for a buffer holding several documents or an EM tail.
Implementations§
Source§impl<'a> Document<'a>
impl<'a> Document<'a>
pub fn heading(&self) -> &Heading<'a>
pub fn body(&self) -> &Body<'a>
pub fn has_syn(&self) -> bool
pub fn has_eot(&self) -> bool
Sourcepub fn warnings(&self) -> &[String]
pub fn warnings(&self) -> &[String]
Loud warnings met while reading (DESIGN.md, Warnings); never an error.
pub fn shape(&self) -> Option<&str>
pub fn name(&self) -> &'a [u8] ⓘ
pub fn files(&self) -> &[FileView<'a>]
pub fn groups(&self) -> impl Iterator<Item = &Group<'a>> + '_
pub fn group_count(&self) -> usize
pub fn group(&self, i: usize) -> &Group<'a>
pub fn group_by_name(&self, name: &str) -> Result<&Group<'a>>
pub fn group_names(&self) -> Vec<&'a [u8]>
pub fn records(&self) -> &[Record<'a>]
Auto Trait Implementations§
impl<'a> Forget for Document<'a>
impl<'a> Freeze for Document<'a>
impl<'a> Move for Document<'a>
impl<'a> RefUnwindSafe for Document<'a>
impl<'a> Send for Document<'a>
impl<'a> Sync for Document<'a>
impl<'a> Unpin for Document<'a>
impl<'a> UnsafeUnpin for Document<'a>
impl<'a> UnwindSafe for Document<'a>
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