pub struct DecodeViolationsError { /* private fields */ }Expand description
A matching validation detail could not be decoded within receiver limits.
Returned by decode_violations. Its diagnostic contains no peer data.
use protovalidate_buffa::decode_violations;
let detail = connectrpc::ErrorDetail {
type_url: "buf.validate.Violations".into(),
value: None,
debug: None,
};
let error = decode_violations(&detail).unwrap_err();
assert_eq!(error.to_string(), "validation detail has no value");Trait Implementations§
Source§impl Clone for DecodeViolationsError
impl Clone for DecodeViolationsError
Source§fn clone(&self) -> DecodeViolationsError
fn clone(&self) -> DecodeViolationsError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DecodeViolationsError
impl Debug for DecodeViolationsError
Source§impl Display for DecodeViolationsError
impl Display for DecodeViolationsError
impl Eq for DecodeViolationsError
Source§impl Error for DecodeViolationsError
impl Error for DecodeViolationsError
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 PartialEq for DecodeViolationsError
impl PartialEq for DecodeViolationsError
impl StructuralPartialEq for DecodeViolationsError
Auto Trait Implementations§
impl Freeze for DecodeViolationsError
impl RefUnwindSafe for DecodeViolationsError
impl Send for DecodeViolationsError
impl Sync for DecodeViolationsError
impl Unpin for DecodeViolationsError
impl UnsafeUnpin for DecodeViolationsError
impl UnwindSafe for DecodeViolationsError
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