pub struct WasmViolation {
pub path: String,
pub code: String,
pub message: String,
pub meta: Option<HashMap<String, String>>,
}Expand description
A validation violation, serializable for WASM.
Fields§
§path: StringField path (e.g., “guest_email”, “rooms[0].adults”)
code: StringError code (e.g., “invalid_email”, “out_of_range”)
message: StringHuman-readable message
meta: Option<HashMap<String, String>>Additional metadata
Trait Implementations§
Source§impl Clone for WasmViolation
impl Clone for WasmViolation
Source§fn clone(&self) -> WasmViolation
fn clone(&self) -> WasmViolation
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 WasmViolation
impl Debug for WasmViolation
Source§impl From<&Violation> for WasmViolation
impl From<&Violation> for WasmViolation
Auto Trait Implementations§
impl Freeze for WasmViolation
impl RefUnwindSafe for WasmViolation
impl Send for WasmViolation
impl Sync for WasmViolation
impl Unpin for WasmViolation
impl UnwindSafe for WasmViolation
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