use crate::MaskElement;
use core::error::Error;
use core::fmt::{self, Debug, Display, Formatter};
#[derive(Clone, Debug)]
pub struct MaskTryFromIntError<T: MaskElement> {
pub index: usize,
pub value: T,
}
impl<T: MaskElement + Display> Display for MaskTryFromIntError<T> {
#[inline]
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
write!(
f,
"cannot construct simd mask from vector with value `{}` at `{}`",
self.value,
self.index,
)
}
}
impl<T: MaskElement + Debug + Display> Error for MaskTryFromIntError<T> { }