pub type Result<T> = core::result::Result<T, MoveError>;
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum MoveError {
BorrowedImmutably,
BorrowedMutably,
}
impl core::fmt::Display for MoveError {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
match self {
Self::BorrowedImmutably => write!(f, "reference was already borrowed immutably"),
Self::BorrowedMutably => write!(f, "reference was already borrowed mutably"),
}
}
}
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
impl std_crate::error::Error for MoveError {}