pub struct ProtocolViolation {
pub rule: &'static str,
pub pointer: String,
pub message: String,
}Expand description
A single protocol-validation violation: a stable machine-readable rule
slug, a JSON pointer to the offending location ("" = the whole event),
and a human-readable message.
The rule slugs are a stable contract (the CLI maps them 1:1 onto its
validate finding rule_ids). The full set:
event_not_object, kind_invalid, kind_unsupported, payload_missing,
unexpected_field, trace_not_object, trace_required, error_not_object,
error_code_invalid, error_message_invalid, error_hint_invalid,
error_retryable_invalid, stream_non_terminal_after_terminal,
stream_duplicate_terminal, stream_missing_terminal.
Fields§
§rule: &'static str§pointer: String§message: StringTrait Implementations§
Source§impl Clone for ProtocolViolation
impl Clone for ProtocolViolation
Source§fn clone(&self) -> ProtocolViolation
fn clone(&self) -> ProtocolViolation
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 ProtocolViolation
impl Debug for ProtocolViolation
Source§impl Display for ProtocolViolation
impl Display for ProtocolViolation
impl Eq for ProtocolViolation
Source§impl Error for ProtocolViolation
impl Error for ProtocolViolation
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 ProtocolViolation
impl PartialEq for ProtocolViolation
impl StructuralPartialEq for ProtocolViolation
Auto Trait Implementations§
impl Freeze for ProtocolViolation
impl RefUnwindSafe for ProtocolViolation
impl Send for ProtocolViolation
impl Sync for ProtocolViolation
impl Unpin for ProtocolViolation
impl UnsafeUnpin for ProtocolViolation
impl UnwindSafe for ProtocolViolation
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.