pub struct ValidationFailure {
pub failure_type: ValidationFailureType,
pub message: String,
pub context: Option<String>,
}Expand description
Detailed information about a validation failure.
This struct provides comprehensive information about why a license validation failed, useful for logging, debugging, and user feedback.
Fields§
§failure_type: ValidationFailureTypeThe type of validation that failed.
message: StringHuman-readable message describing the failure.
context: Option<String>Optional additional context about the failure.
Implementations§
Source§impl ValidationFailure
impl ValidationFailure
Sourcepub fn new(
failure_type: ValidationFailureType,
message: impl Into<String>,
) -> Self
pub fn new( failure_type: ValidationFailureType, message: impl Into<String>, ) -> Self
Creates a new validation failure with the given type and message.
Sourcepub fn with_context(self, context: impl Into<String>) -> Self
pub fn with_context(self, context: impl Into<String>) -> Self
Adds context information to this validation failure.
Trait Implementations§
Source§impl Clone for ValidationFailure
impl Clone for ValidationFailure
Source§fn clone(&self) -> ValidationFailure
fn clone(&self) -> ValidationFailure
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 moreAuto Trait Implementations§
impl Freeze for ValidationFailure
impl RefUnwindSafe for ValidationFailure
impl Send for ValidationFailure
impl Sync for ValidationFailure
impl Unpin for ValidationFailure
impl UnwindSafe for ValidationFailure
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