pub struct AnnotatedExample {
pub document: Table,
pub examples: Vec<(String, Value)>,
}Expand description
Every setting the example mentions, merged into one document.
Fields§
§document: TableActive and commented settings together. Alternatives for one key overwrite each other, so this proves presence, not one valid file.
examples: Vec<(String, Value)>Each documented (path, value), in file order, to parse one at a time.
Implementations§
Source§impl AnnotatedExample
impl AnnotatedExample
Sourcepub fn parse(text: &str) -> Result<Self, ExampleError>
pub fn parse(text: &str) -> Result<Self, ExampleError>
A line is a setting when, after an optional #, it starts with a bare
key and =; prose that merely contains = is skipped.
Auto Trait Implementations§
impl Forget for AnnotatedExample
impl Freeze for AnnotatedExample
impl Move for AnnotatedExample
impl RefUnwindSafe for AnnotatedExample
impl Send for AnnotatedExample
impl Sync for AnnotatedExample
impl Unpin for AnnotatedExample
impl UnsafeUnpin for AnnotatedExample
impl UnwindSafe for AnnotatedExample
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