pub struct ValidateOutput {
pub valid: bool,
pub error: Option<String>,
pub line: Option<usize>,
pub column: Option<usize>,
pub violations: Vec<Violation>,
}Expand description
The verdict of noyalib_validate.
Fields§
§valid: boolWhether the text parses and, when a schema was given, satisfies it.
error: Option<String>The parse error, when the text does not parse.
line: Option<usize>The line of the parse error, when there is one.
column: Option<usize>The column of the parse error, when there is one.
violations: Vec<Violation>Every schema violation; empty when the document is valid or no schema was given.
Trait Implementations§
Source§impl Clone for ValidateOutput
impl Clone for ValidateOutput
Source§impl Debug for ValidateOutput
impl Debug for ValidateOutput
Source§impl Display for ValidateOutput
impl Display for ValidateOutput
impl Eq for ValidateOutput
Source§impl JsonSchema for ValidateOutput
impl JsonSchema for ValidateOutput
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ValidateOutput
impl PartialEq for ValidateOutput
Source§impl Serialize for ValidateOutput
impl Serialize for ValidateOutput
impl StructuralPartialEq for ValidateOutput
Auto Trait Implementations§
impl Freeze for ValidateOutput
impl RefUnwindSafe for ValidateOutput
impl Send for ValidateOutput
impl Sync for ValidateOutput
impl Unpin for ValidateOutput
impl UnsafeUnpin for ValidateOutput
impl UnwindSafe for ValidateOutput
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.