pub enum Error {
Ok(ScriptError),
VerifyScript,
InvalidScriptSize(TryFromIntError),
Unknown(i64),
}
Expand description
This maps to zcash_script_error_t
, but most of those cases aren’t used any more. This only
replicates the still-used cases, and then an Unknown
bucket for anything else that might
happen.
Variants§
Ok(ScriptError)
Any failure that results in the script being invalid.
VerifyScript
An exception was caught.
InvalidScriptSize(TryFromIntError)
The script size can’t fit in a u32
, as required by the C++ code.
Unknown(i64)
Some other failure value recovered from C++.
NB: Linux uses u32
for the underlying C++ enum while Windows uses i32
, so i64
can
hold either.
Trait Implementations§
Source§impl From<u32> for Error
impl From<u32> for Error
Source§fn from(err_code: ScriptError) -> Self
fn from(err_code: ScriptError) -> Self
Converts to this type from the input type.
impl Copy for Error
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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