#[non_exhaustive]pub enum FromObjectError {
NotAMoveStruct,
WrongType,
Bcs(Error),
}Expand description
Error returned when converting an Object into a typed mirror.
Every mirror’s TryFrom<&Object> (and try_from_object_with_type)
conversion returns this on failure: the object either isn’t a Move
struct, carries a type tag that doesn’t match the expected type, or has
BCS contents that fail to decode.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NotAMoveStruct
The object is a package, not a Move struct.
WrongType
The Move struct’s type tag does not match the expected type.
Bcs(Error)
BCS decoding of the struct contents failed.
Trait Implementations§
Source§impl Debug for FromObjectError
impl Debug for FromObjectError
Source§impl Display for FromObjectError
impl Display for FromObjectError
Source§impl Error for FromObjectError
impl Error for FromObjectError
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()
Auto Trait Implementations§
impl Freeze for FromObjectError
impl RefUnwindSafe for FromObjectError
impl Send for FromObjectError
impl Sync for FromObjectError
impl Unpin for FromObjectError
impl UnsafeUnpin for FromObjectError
impl UnwindSafe for FromObjectError
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