pub enum Error {
InvalidPubkey(String),
InvalidAccountData(String),
Transport(String),
Rpc {
code: i64,
message: String,
},
UnexpectedResponse(String),
AccountNotFound(String),
InvalidSeeds(&'static str),
InvalidArgument(String),
Encode(String),
}Expand description
Everything that can go wrong inside solana-wasi.
Variants§
InvalidPubkey(String)
A base58 string was not a valid 32-byte public key.
InvalidAccountData(String)
An account’s data did not match the layout it was parsed as.
Transport(String)
The transport refused or failed the request.
Rpc
The node answered with a JSON-RPC error member.
Fields
UnexpectedResponse(String)
The node answered with JSON that did not match the expected shape.
AccountNotFound(String)
A requested account does not exist on the cluster.
InvalidSeeds(&'static str)
Seeds could not be turned into a program address.
InvalidArgument(String)
A caller-supplied value was rejected before any network call.
Encode(String)
A transaction could not be encoded (too many accounts, oversized, …).
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
1.30.0 · 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()
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 UnsafeUnpin 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