pub enum ExchangeError {
Show 20 variants
Crypto(CryptoError),
Vault(String),
Network(String),
Consensus(String),
ZkpVerification(String),
Metering(String),
TransactionValidation(String),
InsufficientCredits {
required: u64,
available: u64,
},
RateLimitExceeded(String),
AuthenticationFailed,
AuthorizationFailed(String),
InvalidSignature,
TimingAnomaly,
ReplayAttack,
DoubleSpending,
ResourceExhaustion,
InvalidStateTransition(String),
Serialization(String),
Io(Error),
Other(String),
}Expand description
Main error type for the exchange
Variants§
Crypto(CryptoError)
Cryptographic operation failed
Vault(String)
Vault operation failed
Network(String)
Network operation failed
Consensus(String)
DAG consensus error
ZkpVerification(String)
Zero-knowledge proof verification failed
Metering(String)
Resource metering error
TransactionValidation(String)
Transaction validation failed
InsufficientCredits
Insufficient rUv credits
RateLimitExceeded(String)
Rate limiting exceeded
AuthenticationFailed
Authentication failed
AuthorizationFailed(String)
Authorization failed
InvalidSignature
Invalid signature
TimingAnomaly
Timing attack detected
ReplayAttack
Replay attack detected
DoubleSpending
Double spending attempt
ResourceExhaustion
Resource exhaustion attack
InvalidStateTransition(String)
Invalid state transition
Serialization(String)
Serialization error
Io(Error)
IO error
Other(String)
Generic error (avoid using when possible)
Trait Implementations§
Source§impl Debug for ExchangeError
impl Debug for ExchangeError
Source§impl Display for ExchangeError
impl Display for ExchangeError
Source§impl Error for ExchangeError
impl Error for ExchangeError
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<CryptoError> for ExchangeError
impl From<CryptoError> for ExchangeError
Source§fn from(source: CryptoError) -> Self
fn from(source: CryptoError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ExchangeError
impl !RefUnwindSafe for ExchangeError
impl Send for ExchangeError
impl Sync for ExchangeError
impl Unpin for ExchangeError
impl !UnwindSafe for ExchangeError
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