pub enum Validated<E> {
Error(E),
ValidationError(Box<ValidationError>),
}Expand description
A wrapper for error types of functions that can return validation errors.
Variants§
Error(E)
A non-validation error occurred.
ValidationError(Box<ValidationError>)
A validation error occurred.
Implementations§
Trait Implementations§
Source§impl<E> Error for Validated<E>where
E: Error + 'static,
impl<E> Error for Validated<E>where
E: Error + 'static,
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<AllocateBufferError> for Validated<AllocateBufferError>
impl From<AllocateBufferError> for Validated<AllocateBufferError>
Source§fn from(err: AllocateBufferError) -> Self
fn from(err: AllocateBufferError) -> Self
Converts to this type from the input type.
Source§impl From<AllocateImageError> for Validated<AllocateImageError>
impl From<AllocateImageError> for Validated<AllocateImageError>
Source§fn from(err: AllocateImageError) -> Self
fn from(err: AllocateImageError) -> Self
Converts to this type from the input type.
Source§impl<E> From<Box<ValidationError>> for Validated<E>
impl<E> From<Box<ValidationError>> for Validated<E>
Source§fn from(err: Box<ValidationError>) -> Self
fn from(err: Box<ValidationError>) -> Self
Converts to this type from the input type.
Source§impl From<ResetCommandPoolError> for Validated<ResetCommandPoolError>
impl From<ResetCommandPoolError> for Validated<ResetCommandPoolError>
Source§fn from(err: ResetCommandPoolError) -> Self
fn from(err: ResetCommandPoolError) -> Self
Converts to this type from the input type.
Source§impl From<VulkanError> for Validated<VulkanError>
impl From<VulkanError> for Validated<VulkanError>
Source§fn from(err: VulkanError) -> Self
fn from(err: VulkanError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<E> Freeze for Validated<E>where
E: Freeze,
impl<E> RefUnwindSafe for Validated<E>where
E: RefUnwindSafe,
impl<E> Send for Validated<E>where
E: Send,
impl<E> Sync for Validated<E>where
E: Sync,
impl<E> Unpin for Validated<E>where
E: Unpin,
impl<E> UnwindSafe for Validated<E>where
E: UnwindSafe,
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