Enum xo_api_client::RpcError [−][src]
pub enum RpcError {
Show 25 variants
Call(CallError),
Transport(Error),
Request(String),
Internal(SendError),
InvalidResponse(Mismatch<String>),
RestartNeeded(String),
ParseError(Error),
InvalidSubscriptionId,
InvalidRequestId,
UnregisteredNotification(String),
DuplicateRequestId,
MethodAlreadyRegistered(String),
MethodNotFound(String),
SubscriptionNameConflict(String),
SubscriptionClosed(SubscriptionClosedError),
RequestTimeout,
MaxSlotsExceeded,
AlreadyStopped,
EmptyAllowList(&'static str),
ResourceAtCapacity(&'static str),
ResourceNameAlreadyTaken(&'static str),
ResourceNameNotFoundForMethod(&'static str, &'static str),
UninitializedMethod(Box<str, Global>),
MaxResourcesReached,
Custom(String),
}Expand description
Error type.
Variants
Call(CallError)Error that occurs when a call failed.
Tuple Fields of Call
0: CallErrorTransport(Error)Networking error or error on the low-level protocol layer.
Tuple Fields of Transport
0: ErrorRequest(String)JSON-RPC request error.
Tuple Fields of Request
0: StringFrontend/backend channel error.
Invalid response,
RestartNeeded(String)The background task has been terminated.
Tuple Fields of RestartNeeded
0: StringParseError(Error)Failed to parse the data.
Tuple Fields of ParseError
0: ErrorInvalid subscription ID.
Invalid request ID.
UnregisteredNotification(String)Client received a notification with an unregistered method
Tuple Fields of UnregisteredNotification
0: StringA request with the same request ID has already been registered.
MethodAlreadyRegistered(String)Method was already registered.
Tuple Fields of MethodAlreadyRegistered
0: StringMethodNotFound(String)Method with that name has not yet been registered.
Tuple Fields of MethodNotFound
0: StringSubscriptionNameConflict(String)Subscribe and unsubscribe method names are the same.
Tuple Fields of SubscriptionNameConflict
0: StringSubscriptionClosed(SubscriptionClosedError)Subscription got closed.
Tuple Fields of SubscriptionClosed
Request timeout
Configured max number of request slots exceeded.
Attempted to stop server that is already stopped.
EmptyAllowList(&'static str)List passed into set_allowed_origins was empty
Tuple Fields of EmptyAllowList
0: &'static strResourceAtCapacity(&'static str)Failed to execute a method because a resource was already at capacity
Tuple Fields of ResourceAtCapacity
0: &'static strResourceNameAlreadyTaken(&'static str)Failed to register a resource due to a name conflict
Tuple Fields of ResourceNameAlreadyTaken
0: &'static strFailed to initialize resources for a method at startup
Trying to claim resources for a method execution, but the method resources have not been initialized
Failed to register a resource due to a maximum number of resources already registered
Custom(String)Custom error.
Tuple Fields of Custom
0: String