pub struct Violations { /* private fields */ }Expand description
The complete result of validating one payload.
Implementations§
Source§impl Violations
impl Violations
Sourcepub fn first(&self) -> Option<&Violation>
pub fn first(&self) -> Option<&Violation>
The first violation, which is the one reported back to the peer.
Sourcepub fn push(
&mut self,
path: &ValidationPath,
kind: ViolationKind,
reason: impl Into<String>,
)
pub fn push( &mut self, path: &ValidationPath, kind: ViolationKind, reason: impl Into<String>, )
Records one violation at the current position.
Sourcepub fn retain_kinds(&mut self, keep: impl FnMut(ViolationKind) -> bool)
pub fn retain_kinds(&mut self, keep: impl FnMut(ViolationKind) -> bool)
Drops violations of kinds the caller has opted to tolerate.
Trait Implementations§
Source§impl Clone for Violations
impl Clone for Violations
Source§impl Debug for Violations
impl Debug for Violations
Source§impl Default for Violations
impl Default for Violations
Source§impl Display for Violations
impl Display for Violations
impl Eq for Violations
Source§impl Error for Violations
Available on crate feature std only.
impl Error for Violations
Available on crate feature
std only.1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl IntoIterator for Violations
impl IntoIterator for Violations
Source§impl PartialEq for Violations
impl PartialEq for Violations
impl StructuralPartialEq for Violations
Auto Trait Implementations§
impl Forget for Violations
impl Freeze for Violations
impl Move for Violations
impl RefUnwindSafe for Violations
impl Send for Violations
impl Sync for Violations
impl Unpin for Violations
impl UnsafeUnpin for Violations
impl UnwindSafe for Violations
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