#[non_exhaustive]pub enum Error<'a> {
BadBytesConvert(Error),
BTCHashError(Error),
HexError(FromHexError),
IncorrectClientStatus(String),
Infallible(Infallible),
InvalidJsonRpcMessageKind,
InvalidReceiver(Method<'a>),
InvalidSubmission,
Method(MethodError<'a>),
UnauthorizedClient(String),
UnknownID(u64),
InvalidVersionMask(HexU32Be),
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
BadBytesConvert(Error)
BTCHashError(Error)
HexError(FromHexError)
Errors on bad hex decode/encode.
IncorrectClientStatus(String)
Errors if ClientStatus is in an unexpected state when a message is received. For example,
if a mining.subscribed is received when the ClientStatus is in the Init state.
Infallible(Infallible)
InvalidJsonRpcMessageKind
Errors if server receives a json_rpc request as the server should only receive responses.
TODO: Should update to accommodate miner requesting a difficulty change
InvalidReceiver(Method<'a>)
Errors if the client receives an invalid message that was intended to be sent from the client to the server, NOT from the server to the client.
InvalidSubmission
Errors if server receives and invalid mining.submit from the client.
Method(MethodError<'a>)
Errors encountered during conversion between valid json_rpc messages and SV1 messages.
Errors if action is attempted that requires the client to be authorized, but it is unauthorized. The client username is given in the error message.
UnknownID(u64)
Errors if server does not recognize the client’s id.