pub struct Item {
pub directive: String,
pub attrs: Vec<(String, String)>,
pub sections: Vec<(String, String)>,
pub line: usize,
}Expand description
One parsed item: an opening directive, its attributes, and its payload sections in document order.
Fields§
§directive: StringThe item-opening directive name (edit, set, …).
attrs: Vec<(String, String)>key=value attributes from the opening fence line, in order.
sections: Vec<(String, String)>Payload sections: (name, verbatim payload). Each payload line keeps
its \n; an empty section is the empty string (zero lines).
line: usize1-based source line of the opening directive (for diagnostics).
Implementations§
Trait Implementations§
impl Eq for Item
impl StructuralPartialEq for Item
Auto Trait Implementations§
impl Freeze for Item
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnsafeUnpin for Item
impl UnwindSafe for Item
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