#[non_exhaustive]pub enum RpcError {
InvalidProcedure,
ProgUnavail,
InvalidVersion {
low: u32,
high: u32,
},
RpcMismatch,
GarbageArguments,
SystemError,
AuthenticationError,
ConnectFailed,
PoolClosed,
Canceled,
InvalidPoolConfiguration,
}Expand description
Errors that can occur while preparing or performing RPC calls.
Protocol errors correspond to ONC-RPC reply statuses. Local transport and
pool errors have no wire-level equivalent; if returned by a server handler,
rpc_driver encodes them as RpcError::SystemError.
§Wire boundary versus driver-local variants
The wire-level contract — stable across driver releases — is:
InvalidProcedure,
ProgUnavail,
InvalidVersion,
RpcMismatch,
GarbageArguments,
SystemError, and
AuthenticationError.
The remaining variants describe local operational failures
(connections, pools) and are surfaced to callers without crossing the
wire. The enum is #[non_exhaustive], so new operational variants can
be added without a breaking release; any variant unknown to a given
driver release is encoded on the wire as a system error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidProcedure
The requested procedure is not defined for the selected service.
No service is registered for the requested program number.
InvalidVersion
The program exists, but not at the requested version.
RpcMismatch
The peer requested an unsupported ONC-RPC protocol version.
GarbageArguments
The call arguments could not be decoded.
SystemError
The call failed without a more specific wire-level error.
AuthenticationError
Authentication credentials or verification failed.
ConnectFailed
A client connection could not be established.
PoolClosed
The connection pool has been shut down or can no longer accept work.
Canceled
The pool abandoned a queued request before it could complete.
InvalidPoolConfiguration
The requested pool configuration is invalid.
Trait Implementations§
impl Eq for RpcError
Source§impl Error for RpcError
impl Error for RpcError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()