#[non_exhaustive]pub struct ValidationMessage {
pub message: String,
pub level: Level,
pub metadata: HashMap<String, String>,
pub code: String,
/* private fields */
}Expand description
Represent user-facing validation result message.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.message: StringThe result of the validation.
level: LevelMessage severity level (warning or error).
metadata: HashMap<String, String>Additional metadata related to the result.
code: StringA custom code identifying this specific message.
Implementations§
Source§impl ValidationMessage
impl ValidationMessage
Trait Implementations§
Source§impl Clone for ValidationMessage
impl Clone for ValidationMessage
Source§fn clone(&self) -> ValidationMessage
fn clone(&self) -> ValidationMessage
Returns a duplicate of the value. Read more
1.0.0 · 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 ValidationMessage
impl Debug for ValidationMessage
Source§impl Default for ValidationMessage
impl Default for ValidationMessage
Source§fn default() -> ValidationMessage
fn default() -> ValidationMessage
Returns the “default value” for a type. Read more
Source§impl Message for ValidationMessage
impl Message for ValidationMessage
Source§impl PartialEq for ValidationMessage
impl PartialEq for ValidationMessage
impl StructuralPartialEq for ValidationMessage
Auto Trait Implementations§
impl Freeze for ValidationMessage
impl RefUnwindSafe for ValidationMessage
impl Send for ValidationMessage
impl Sync for ValidationMessage
impl Unpin for ValidationMessage
impl UnwindSafe for ValidationMessage
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