pub trait OptionalValueObject<T: ValueObject> {
// Required method
fn validate_if_present(&self) -> Result<(), T::Error>;
}Expand description
Extension trait for optional value objects.
Required Methods§
Sourcefn validate_if_present(&self) -> Result<(), T::Error>
fn validate_if_present(&self) -> Result<(), T::Error>
Validate the inner value if present.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".