pub trait Warning:
Sized
+ Debug
+ Display
+ Send
+ Sync {
// Required method
fn id(&self) -> Id;
// Provided method
fn is_rejected(&self) -> bool { ... }
}Expand description
Each mod defines warnings for the type that it’s trying to parse or lint from a json::Element.
The Warning in the mod should impl this trait to take part in the Warning system.
Required Methods§
Provided Methods§
Sourcefn is_rejected(&self) -> bool
fn is_rejected(&self) -> bool
Whether this is the Rejected marker a feature emits when it rejects the schema IR
for the object it is building (see Set::ok_or_bail).
The precise structural cause (a missing or wrong-typed field) was already reported by
the schema walk, so a consumer can drop these follow-on markers via
Set::remove_rejected. Other Warnings return false.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl Warning for Infallible
A FromSchema implementation that can never emit a warning uses std::convert::Infallible
as its Warning type. The type is uninhabited, so every method is unreachable.
impl Warning for Infallible
A FromSchema implementation that can never emit a warning uses std::convert::Infallible
as its Warning type. The type is uninhabited, so every method is unreachable.