Expand description
Synchronous filesystem interface facets.
The compatibility VecFs trait remains the optimized vector contract.
Its single-operation helpers form today’s scalar facet without introducing
a second, conflicting set of method names.
Modules§
- sfsi
- Scalar/singular view of the synchronous interface.
- vfsi
- Vectorized view of the synchronous interface.
Structs§
- Adb
- An Application Data Block (ADB) pattern, mirroring
struct tc_adb. - Attr
Mask - A bitflags set of requested attributes.
- Capabilities
- Typed backend capabilities. Unlike the legacy integer constants, this rejects accidental mixing with unrelated bit fields.
- DirEntry
- One native directory entry with its already-fetched metadata.
- Directory
Listing - One directory and its entries, with attributes fetched during enumeration.
- Extent
Pair - One extent to copy, mirroring
struct tc_extent_pair. - FsClient
- Cloneable owner of one synchronous backend connection.
- FsFile
- Owned RAII file which does not borrow the client.
- FsRead
- Typed read request for
FsClient::readv. - FsRead
Into - Typed vector read into caller-provided storage.
- FsWrite
- Typed borrowed write request for
FsClient::writev. - Handle
Id - Opaque identifier for a backend-owned open file.
- Metadata
- Idiomatic metadata returned by the Rust-native path API.
- Metadata
Query - Typed metadata lookup request. Returned fields are still represented by
VfAttrsduring the compatibility transition, but request and mutation masks are no longer conflated. - Metadata
Update - Rust-native metadata changes used by
MetadataFileSystem. - Open
Flags - Typed file-open behavior for the Rust-native API.
- Open
Options std::fs::OpenOptions-style builder tied to anFsClient.- Open
Request - One complete open request. This replaces three error-prone parallel slices of paths, flags, and modes.
- Permissions
- Rust-native permission bits, independent of protocol wire attributes.
- Read
AllOptions - Resource limits for reading multiple complete files into memory.
- Read
DirOptions - Resource limits for one allocating directory listing.
- Read
Into Result - Metadata for a read placed directly into caller-provided storage.
- ReadOp
- One element of a batched read, replacing the C
tc_iovec(which mixed input and output fields in a single mutable struct). - Read
Result - The result of one
ReadOp: the data and whether end-of-file was hit.fileechoes the request’s file reference so results can be paired back to mixed fd/path inputs without reordering assumptions. - Read
Stream Options - Tuning options for bounded single-file streaming reads.
- Remove
Options - Options controlling recursive removal.
- RpcError
- An error from the low-level client: either an NFS4ERR_* status reported by the server for a compound operation, or a transport/RPC-level failure.
- SetAttributes
- Valid-by-construction metadata mutation request.
- SetMetadata
- Builder for an atomic metadata update request.
- VfAttrs
- File attributes, mirroring
struct tc_attrs.modeis the fullst_mode(permission bits plusS_IFMTfile-type bits); themtime/atime/ctimefields hold seconds and nanoseconds. - VfFile
Handle - RAII descriptor adapter implementing standard synchronous Rust I/O traits.
- VfOpen
Options - Idiomatic Rust open options for a VFSI filesystem.
- Walk
Entry - A directory and its entries, as returned by a filesystem walk.
pathis the directory’s root-relative path;entriesare its immediate children. - Walk
Options - Resource limits for an allocating recursive directory walk.
- WriteOp
- One element of a batched write.
- Write
OpRef - Borrowed write request for callers that should not have to allocate an
owned
Vec<u8>merely to submit a vector operation. - Write
Result - The result of one
WriteOp.fileechoes the request’s file reference.
Enums§
- Error
Domain - Namespace in which a status code is meaningful.
- Outcome
Certainty - Whether the caller can know if a failed operation changed remote state.
- Retry
Class - Whether retrying an operation is safe without first reconciling state.
- Seek
From - How filesystem seek operations interpret their offset, mirroring
SEEK_SET/SEEK_CUR/SEEK_ENDas an enum. - Status
Code - Typed protocol/filesystem status. Transport failures have no status.
- VfDir
- An opaque handle to an open directory.
- VfError
- The failure of one operation in a vectorized call.
- VfFile
- A reference to a file: an open descriptor, a path, or a special
pseudo-file. This is the Rust-native form of the C
tc_filetagged struct (type+fd+path), where the variant is the tag. - VfOffset
- The offset of a read or write operation.
- VfPath
Base - The base a path is resolved against, replacing the C
VF_FD_CWD/VF_FD_ABSsentinel descriptors. - VfType
- The NFSv4 object type, replacing the raw
NF4*wire codes inVfAttrs::ftype.
Constants§
- DEFAULT_
DIRECTORY_ MAX_ ENTRIES - Default maximum number of entries returned by allocating directory APIs.
- DEFAULT_
DIRECTORY_ MAX_ PATH_ BYTES - Default combined path-storage budget for allocating directory APIs.
- DEFAULT_
READV_ MAX_ TOTAL_ BYTES - Default aggregate payload limit for owned vector reads.
- DEFAULT_
READ_ ALLV_ MAX_ TOTAL_ BYTES - Default aggregate payload limit for
VecFs::read_allv. - DEFAULT_
READ_ MAX_ BYTES - Default payload limit for APIs that allocate and return complete contents.
- DEFAULT_
READ_ STREAM_ CHUNK_ BYTES - Default size of each chunk delivered by the bounded single-file stream API.
- DEFAULT_
WALK_ MAX_ DEPTH - Default recursion depth for
VecFs::walk. - ERR_
ACCES - ERR_
EBADF - ERR_
EXIST - ERR_
INVAL - ERR_IO
- ERR_
ISDIR - ERR_
NOENT - Generic errno-style error codes (they coincide with the NFS4ERR codes for the same conditions, which the NFS backend reports).
- ERR_
NOTDIR - NF4BLK
- NF4CHR
- NF4DIR
- NF4FIFO
- NF4LNK
- NF4REG
- NFSv4 wire type codes (NF4*), used to decode/encode
VfType. - NF4SOCK
- STATUS_
TRANSPORT - NFS4 status used for transport-level failures (there is no NFS status).
- VF_
CAP_ HARDLINKS - The backend can create hard links and report their shared identity.
- VF_
CAP_ LSTAT - The backend implements no-follow metadata operations (
lstatsemantics). - VF_
CAP_ NON_ UTF8_ PATHS - The backend accepts paths containing arbitrary non-UTF-8 Unix bytes.
- VF_
CAP_ POSIX_ METADATA - The backend reports and honors Unix mode/ownership/link-count metadata.
- VF_
CAP_ SERVER_ COPY - Capability bit returned by a backend’s capability query when it will currently attempt a server-side copy operation (NFSv4.2 COPY or SMB FSCTL_SRV_COPYCHUNK).
- VF_
CAP_ SYMLINKS - The backend can create, inspect, and copy symbolic links without following them.
- VF_
CAP_ UNIX_ SEMANTICS - Capabilities shared by the complete Unix-like NFS and dummy backends.
- VF_
ERR_ RPC - Errors that have no filesystem status (transport / client side).
- VF_
ERR_ UNSUPPORTED - Requested feature is not implemented by this backend.
Traits§
- Copy
File System - File-copy operations. Backends may accelerate this server-side.
- Directory
File System - Directory creation and enumeration.
- File
System - Core synchronous scalar filesystem operations.
- Link
File System - Symbolic and hard-link operations.
- Metadata
File System - Path metadata operations independent of open descriptors.
- Namespace
File System - Namespace mutations shared by files and directories.
- Native
File System - Complete scalar filesystem surface used by ordinary native applications.
- VecFs
- A vectorized filesystem: many small operations coalesced into as few round trips as the backend supports.
- VecFs
Ext AsRef<Path>convenience wrappers forVecFsmethods.- Vector
File System - Optimized ordered vectors. This is deliberately separate from the scalar contract so a backend can implement scalar semantics without pretending to support native batching.
Functions§
- rm_
recursive tc_rm_recursive().
Type Aliases§
- Fd
- An open file descriptor (backend-assigned), the Rust spelling of the C
intfd. - Read
Stream Callback - Callback used by vectorized streaming reads.
- RpcResult
- Convenience alias used throughout the low-level client.
- VfRes
- Result of a compound-style operation:
()on success, or the index and error of the first failing operation. - VfResult