pub struct Section {
pub line_number: u32,
/* private fields */
}Fields§
§line_number: u32Implementations§
Source§impl Section
impl Section
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 len(&self) -> usize
pub fn is_empty(&self) -> bool
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_embed(&self, key: &str) -> Result<&Embed, Error>
pub fn required_field(&self, key: &str) -> Result<&Field, Error>
pub fn required_flag(&self, key: &str) -> Result<&Flag, Error>
pub fn required_section(&self, key: &str) -> Result<&Section, Error>
pub fn section(&self, key: &str) -> Result<SectionQuery<'_>, Error>
pub fn untouched_elements(&self) -> Vec<&dyn Element>
Trait Implementations§
Source§impl Element for Section
impl Element for Section
fn as_section(&self) -> Option<&Section>
fn is_section(&self) -> bool
fn line_number(&self) -> u32
fn snippet(&self) -> String
fn snippet_with_options(&self, printer: &dyn Printer, gutter: bool) -> String
fn touch(&self)
fn as_attribute(&self) -> Option<&Attribute>
fn as_embed(&self) -> Option<&Embed>
fn as_field(&self) -> Option<&Field>
fn as_flag(&self) -> Option<&Flag>
fn as_item(&self) -> Option<&Item>
fn is_attribute(&self) -> bool
fn is_embed(&self) -> bool
fn is_field(&self) -> bool
fn is_flag(&self) -> bool
fn is_item(&self) -> bool
Source§impl SectionElement for Section
impl SectionElement for Section
Auto Trait Implementations§
impl !Freeze for Section
impl !RefUnwindSafe for Section
impl !Send for Section
impl !Sync for Section
impl Unpin for Section
impl !UnwindSafe for Section
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