1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! Userspace NFS client library.
//!
//! This crate talks to NFS servers directly from a Rust process. It is meant
//! for applications that want NFS as an object/file storage backend without
//! mounting the export into the local filesystem.
//!
//! The default feature set enables blocking clients:
//!
//! ```no_run
//! # #[cfg(feature = "blocking")]
//! # {
//! let mut client = nfs::v3::blocking::Client::connect("127.0.0.1:/export")?;
//! client.write("/hello.txt", b"hello")?;
//! let bytes = client.read("/hello.txt")?;
//! assert_eq!(bytes, b"hello");
//! # }
//! # Ok::<(), nfs::Error>(())
//! ```
//!
//! ```no_run
//! # #[cfg(feature = "blocking")]
//! # {
//! let mut client = nfs::v4::blocking::Client::connect("127.0.0.1")?;
//! client.write("/export/hello.txt", b"hello")?;
//! let bytes = client.read("/export/hello.txt")?;
//! assert_eq!(bytes, b"hello");
//! client.shutdown()?;
//! # }
//! # Ok::<(), nfs::Error>(())
//! ```
//!
//! # Feature flags
//!
//! - `blocking`: Enables synchronous clients. This is enabled by default.
//! - `tokio`: Enables asynchronous clients backed by Tokio.
//! - `protocol`: Exposes low-level XDR and protocol wire types for tests,
//! custom integrations, and protocol tooling.
//!
//! # API layers
//!
//! Most applications should use [`v3::blocking::Client`],
//! [`v4::blocking::Client`], or the corresponding Tokio clients. The raw
//! protocol modules are intentionally kept behind the `protocol` feature so
//! high-level users do not depend on unstable wire-level details.
pub
pub
pub use ;
pub use RetryPolicy;
pub use ;