pub struct Diagnostic {
pub original_level: i32,
pub adjusted_level: i32,
pub cause: u32,
pub msg: String,
pub path: Option<Path>,
}Expand description
Representation of a diagnostic message.
Fields§
§original_level: i32The original error level/severity for this diagnostic.
adjusted_level: i32The error level/severity for this diagnostic after adjustment according to the validator configuration.
cause: u32The machine-readable message for this diagnostic.
msg: StringThe human-readable message for this diagnostic.
path: Option<Path>A path associated with this diagnostic. This is usually the path for the node it is associated with, but not necessarily: for example, a diagnostic message relating to a duplicate definition may refer back to the previous or first definition.
Implementations§
Source§impl Diagnostic
impl Diagnostic
Sourcepub fn original_level(&self) -> Level
pub fn original_level(&self) -> Level
Returns the enum value of original_level, or the default if the field is set to an invalid enum value.
Sourcepub fn set_original_level(&mut self, value: Level)
pub fn set_original_level(&mut self, value: Level)
Sets original_level to the provided enum value.
Sourcepub fn adjusted_level(&self) -> Level
pub fn adjusted_level(&self) -> Level
Returns the enum value of adjusted_level, or the default if the field is set to an invalid enum value.
Sourcepub fn set_adjusted_level(&mut self, value: Level)
pub fn set_adjusted_level(&mut self, value: Level)
Sets adjusted_level to the provided enum value.
Trait Implementations§
Source§impl Clone for Diagnostic
impl Clone for Diagnostic
Source§fn clone(&self) -> Diagnostic
fn clone(&self) -> Diagnostic
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Diagnostic
impl Debug for Diagnostic
Source§impl Default for Diagnostic
impl Default for Diagnostic
Source§impl From<&Diagnostic> for Diagnostic
impl From<&Diagnostic> for Diagnostic
Source§fn from(node: &Diagnostic) -> Self
fn from(node: &Diagnostic) -> Self
Source§impl InputNode for Diagnostic
impl InputNode for Diagnostic
Source§fn type_to_node() -> Node
fn type_to_node() -> Node
Source§fn data_to_node(&self) -> Node
fn data_to_node(&self) -> Node
Source§fn oneof_variant(&self) -> Option<&'static str>
fn oneof_variant(&self) -> Option<&'static str>
Source§fn parse_unknown(&self, y: &mut Context<'_>) -> bool
fn parse_unknown(&self, y: &mut Context<'_>) -> bool
Source§impl Message for Diagnostic
impl Message for Diagnostic
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for Diagnostic
impl PartialEq for Diagnostic
Source§impl ProtoMessage for Diagnostic
impl ProtoMessage for Diagnostic
Source§fn proto_message_type() -> &'static str
fn proto_message_type() -> &'static str
impl StructuralPartialEq for Diagnostic
Auto Trait Implementations§
impl Freeze for Diagnostic
impl RefUnwindSafe for Diagnostic
impl Send for Diagnostic
impl Sync for Diagnostic
impl Unpin for Diagnostic
impl UnwindSafe for Diagnostic
Blanket Implementations§
Source§impl<T> AnyExt for T
impl<T> AnyExt for T
Source§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
T behind referenceSource§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
T behind mutable referenceSource§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
T behind Rc pointerSource§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
T behind Arc pointerSource§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
fn coerce_rc_to(self: Rc<X>) -> Rc<T>
fn coerce_box_to(self: Box<X>) -> Box<T>
fn coerce_ref_to(&self) -> &T
fn coerce_mut_to(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more