pub struct Document { /* private fields */ }Implementations§
Source§impl Document
impl Document
pub const LINE_NUMBER: u32 = 1u32
pub fn elements(&self) -> &[Box<dyn SectionElement>]
pub fn embed(&self, key: &str) -> Result<EmbedQuery<'_>, Error>
pub fn field(&self, key: &str) -> Result<FieldQuery<'_>, Error>
pub fn flag(&self, key: &str) -> Result<FlagQuery<'_>, Error>
pub fn line_range(&self) -> RangeInclusive<u32>
pub fn optional_embed(&self, key: &str) -> Result<Option<&Embed>, Error>
pub fn optional_field(&self, key: &str) -> Result<Option<&Field>, Error>
pub fn optional_flag(&self, key: &str) -> Result<Option<&Flag>, Error>
pub fn optional_section(&self, key: &str) -> Result<Option<&Section>, Error>
pub fn required_section(&self, key: &str) -> Result<&Section, Error>
pub fn section(&self, key: &str) -> Result<SectionQuery<'_>, Error>
pub fn snippet(&self) -> String
pub fn snippet_with_options( &self, printer: &dyn Printer, gutter: bool, ) -> String
pub fn untouched_elements(&self) -> Vec<&dyn Element>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Document
impl !RefUnwindSafe for Document
impl !Send for Document
impl !Sync for Document
impl Unpin for Document
impl !UnwindSafe 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