Skip to content

feat(nfs3_client): add is_connection_reusable method to error types#162

Merged
Vaiz merged 3 commits into
mainfrom
157-document-io-state-after-failed-recv-reply
May 2, 2026
Merged

feat(nfs3_client): add is_connection_reusable method to error types#162
Vaiz merged 3 commits into
mainfrom
157-document-io-state-after-failed-recv-reply

Conversation

@Vaiz
Copy link
Copy Markdown
Owner

@Vaiz Vaiz commented May 2, 2026

Adds an is_connection_reusable method to all error types in nfs3_client, letting callers decide whether a connection can be kept after an error without inspecting individual variants

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a lightweight API to nfs3_client error types so callers can decide whether an underlying connection can be safely reused after an error, without needing to match on individual error variants.

Changes:

  • Documented connection state semantics for RpcClient::call and RpcError.
  • Added is_connection_reusable() inherent methods to RpcError, PortmapError, MountError, and ConnectError.
  • Updated the clippy::similar_names suppression on RpcClient::call to use #[expect(..., reason = ...)].

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
crates/nfs3_client/src/rpc.rs Documents how callers should decide whether to reuse a connection after call() errors; updates clippy suppression style.
crates/nfs3_client/src/error/rpc.rs Adds RpcError::is_connection_reusable() and documents connection-state considerations.
crates/nfs3_client/src/error/portmap.rs Adds PortmapError::is_connection_reusable() delegating to RpcError when applicable.
crates/nfs3_client/src/error/mount.rs Adds MountError::is_connection_reusable() delegating to RpcError when applicable.
crates/nfs3_client/src/error/connect.rs Adds ConnectError::is_connection_reusable() delegating to nested errors.

Comment thread crates/nfs3_client/src/error/rpc.rs Outdated
Comment thread crates/nfs3_client/src/rpc.rs Outdated
Vaiz and others added 2 commits May 2, 2026 14:09
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Vaiz Vaiz marked this pull request as ready for review May 2, 2026 12:30
@Vaiz Vaiz merged commit 82e07b1 into main May 2, 2026
11 checks passed
@Vaiz Vaiz deleted the 157-document-io-state-after-failed-recv-reply branch May 2, 2026 12:31
@github-actions github-actions Bot mentioned this pull request May 2, 2026
@github-actions github-actions Bot mentioned this pull request May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants