pub enum RpcError {
}Expand description
Error from an RPC call.
Covers I/O failures, XDR encoding/decoding issues, and RPC protocol errors.
Returned by RpcClient::call and all
Nfs3Client operations.
§Connection state after an error
Not every error leaves the underlying transport in the same state.
Use is_connection_reusable to decide
whether the connection can be kept.
Variants§
Io(Error)
An I/O error occurred during network communication.
Xdr(Error)
Failed to serialize or deserialize an XDR-encoded message.
UnexpectedCall
Received a CALL message when a REPLY was expected.
Auth(auth_stat)
Server rejected the request due to an authentication failure.
RpcMismatch
Server does not support the requested RPC version.
WrongLength
The serialized RPC message length is not a multiple of 4 bytes.
UnexpectedXid
The reply XID does not match the request XID.
NotFullyParsed
The reply was not fully consumed after decoding.
The requested program is not available on the server.
ProgMismatch
The requested program version is not supported.
The requested procedure is not available.
GarbageArgs
The server could not decode the procedure arguments.
FragmentedReply
The server sent a fragmented reply, which is not supported.
Handling fragmented replies would require significant changes to the receive logic because subsequent fragments are not guaranteed to arrive immediately after the first one.
SystemErr
An unspecified server-side system error occurred.
Implementations§
Source§impl RpcError
impl RpcError
Sourcepub const fn is_connection_reusable(&self) -> bool
pub const fn is_connection_reusable(&self) -> bool
Returns true if the connection that produced this error is still in
a clean state and may be reused for the next call.
Returns false only for Io (transport is dead) and
FragmentedReply (unread fragment data left
in the socket).
All other errors — including Xdr,
WrongLength, NotFullyParsed,
and UnexpectedXid — are produced while
operating on in-memory buffers after the full fragment has already been
consumed from the wire, so the transport remains at a clean message
boundary.
Trait Implementations§
Source§impl Error for RpcError
impl Error for RpcError
Source§fn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()