pub enum StrikeError {
Rpc(TransportError),
Contract(String),
NonceMismatch {
expected: u64,
got: u64,
},
MarketNotActive(u64),
InsufficientBalance,
Config(String),
NoWallet,
WebSocket(String),
Indexer(String),
Other(Report),
}Expand description
Errors returned by the Strike SDK.
Variants§
Rpc(TransportError)
RPC transport error.
Contract(String)
Contract call reverted with a reason.
NonceMismatch
Nonce mismatch (nonce-manager feature).
MarketNotActive(u64)
Market is not in an active state.
InsufficientBalance
Insufficient USDT balance for the operation.
Config(String)
Configuration error.
NoWallet
No wallet configured (tried to send a transaction in read-only mode).
WebSocket(String)
WebSocket connection error.
Indexer(String)
Indexer API error.
Other(Report)
Generic error wrapper.
Trait Implementations§
Source§impl Debug for StrikeError
impl Debug for StrikeError
Source§impl Display for StrikeError
impl Display for StrikeError
Source§impl Error for StrikeError
impl Error for StrikeError
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()
Source§impl From<Error> for StrikeError
impl From<Error> for StrikeError
Source§impl From<Report> for StrikeError
impl From<Report> for StrikeError
Source§impl From<RpcError<TransportErrorKind>> for StrikeError
impl From<RpcError<TransportErrorKind>> for StrikeError
Source§fn from(e: TransportError) -> Self
fn from(e: TransportError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for StrikeError
impl !RefUnwindSafe for StrikeError
impl Send for StrikeError
impl Sync for StrikeError
impl Unpin for StrikeError
impl UnsafeUnpin for StrikeError
impl !UnwindSafe for StrikeError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.