pub struct Field {
pub line_number: u32,
/* private fields */
}Fields§
§line_number: u32Implementations§
Source§impl Field
impl Field
pub fn attributes(&self) -> Result<&[Attribute], Error>
pub fn items(&self) -> Result<&[Item], Error>
pub fn optional_value(&self) -> Result<Option<String>, Error>
pub fn required_attribute(&self, key: &str) -> Result<&Attribute, Error>
pub fn required_value<T: FromStr>(&self) -> Result<T, Error>
pub fn untouched_elements(&self) -> Vec<&dyn Element>
Trait Implementations§
Source§impl Element for Field
impl Element for Field
fn as_field(&self) -> Option<&Field>
fn is_field(&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_flag(&self) -> Option<&Flag>
fn as_item(&self) -> Option<&Item>
fn as_section(&self) -> Option<&Section>
fn is_attribute(&self) -> bool
fn is_embed(&self) -> bool
fn is_flag(&self) -> bool
fn is_item(&self) -> bool
fn is_section(&self) -> bool
Source§impl SectionElement for Field
impl SectionElement for Field
Auto Trait Implementations§
impl !Freeze for Field
impl !RefUnwindSafe for Field
impl !Send for Field
impl !Sync for Field
impl Unpin for Field
impl !UnwindSafe for Field
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