pub struct UsageDoc {
pub schema_version: u32,
pub schema_supported: bool,
pub plots: Vec<PlotEntry>,
pub warnings: Vec<String>,
}Expand description
A parsed usage document. Parsing never fails; problems are recorded as warnings and the rest of the document is still parsed.
Fields§
§schema_version: u32Schema version declared in the document (0 when absent).
schema_supported: boolFalse when the document declares a newer schema than we support.
plots: Vec<PlotEntry>Successfully parsed plot blocks, in document order.
warnings: Vec<String>Non-fatal problems encountered while parsing.
Implementations§
Source§impl UsageDoc
impl UsageDoc
Sourcepub fn schema_supported(&self) -> bool
pub fn schema_supported(&self) -> bool
True when the document’s schema version is understood by this binary.
Sourcepub fn declared_schema_version(&self) -> Option<u32>
pub fn declared_schema_version(&self) -> Option<u32>
The declared schema version, or None when the document has none.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UsageDoc
impl RefUnwindSafe for UsageDoc
impl Send for UsageDoc
impl Sync for UsageDoc
impl Unpin for UsageDoc
impl UnsafeUnpin for UsageDoc
impl UnwindSafe for UsageDoc
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more