ore_pool_api/
error.rs

1use steel::*;
2
3#[repr(u32)]
4#[derive(Debug, Error, Clone, Copy, PartialEq, Eq, IntoPrimitive)]
5pub enum PoolError {
6    #[error("Missing mining reward")]
7    MissingMiningReward = 0,
8    #[error("Could not parse mining reward")]
9    CouldNotParseMiningReward = 1,
10    #[error("Staking is in withdraw only mode")]
11    WithdrawOnlyMode = 2,
12    #[error("Cannot attribute more rewards than are currently claimable")]
13    AttributionTooLarge = 3,
14}
15
16#[derive(Debug, Error)]
17pub enum ApiError {
18    #[error("operator server url must be 128 bytes or less")]
19    UrlTooLarge,
20}
21
22error!(PoolError);