pub enum Error {
Show 17 variants
Invalid(String),
Open(OpenRefusal),
InsufficientFunds(String),
NoAccount,
NeedsKey(KeyState),
WrongWallet {
wallet: String,
owner: String,
},
Wallet(WalletError),
Signature(String),
Relayer(RelayerError),
NotKept(Accepted),
Exchange(String),
Transport(TransportError),
Chain(ReadError),
Precompile(ReadError),
Store(StoreError),
Random(String),
Decode(String),
}Expand description
Why a client call failed.
Variants§
Invalid(String)
The intent is malformed (leverage out of range, no margin, no positions to close). Nothing was sent.
Open(OpenRefusal)
The protocol would refuse the open. Nothing was sent.
InsufficientFunds(String)
More than the account holds. Nothing was sent.
NoAccount
The account has not streamed yet, so nothing can be checked.
NeedsKey(KeyState)
The session key cannot sign yet. KeyState::Missing needs a key made,
KeyState::Unregistered needs the wallet to register it.
WrongWallet
The signing wallet is not the account’s owner.
Wallet(WalletError)
Signature(String)
A signature that does not recover to the account’s owner, or a session key that cannot sign.
Relayer(RelayerError)
NotKept(Accepted)
The relayer answered but did not keep the intent.
Exchange(String)
Hyperliquid refused a deposit send, with its message. Later sends were not made.
Transport(TransportError)
Chain(ReadError)
Precompile(ReadError)
Store(StoreError)
Random(String)
Decode(String)
An answer that could not be decoded.
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
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()
Source§impl From<OpenRefusal> for Error
impl From<OpenRefusal> for Error
Source§fn from(e: OpenRefusal) -> Self
fn from(e: OpenRefusal) -> Self
Converts to this type from the input type.
Source§impl From<RelayerError> for Error
impl From<RelayerError> for Error
Source§fn from(source: RelayerError) -> Self
fn from(source: RelayerError) -> Self
Converts to this type from the input type.
Source§impl From<StoreError> for Error
impl From<StoreError> for Error
Source§fn from(source: StoreError) -> Self
fn from(source: StoreError) -> Self
Converts to this type from the input type.
Source§impl From<TransportError> for Error
impl From<TransportError> for Error
Source§fn from(source: TransportError) -> Self
fn from(source: TransportError) -> Self
Converts to this type from the input type.
Source§impl From<WalletError> for Error
impl From<WalletError> for Error
Source§fn from(e: WalletError) -> Self
fn from(e: WalletError) -> Self
Converts to this type from the input type.
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