Expand description
Portable application contracts, operations, options, and extension workflows. Portable synchronous vectorized filesystem API.
Implement Vfsi for native vector execution; VfsiExt is blanket
implemented and composes scalar conveniences and workflows from those vectors.
This module has no backend, native RPC, or runtime dependencies.
Application read/write operations live here rather than sharing the legacy backend operation types at the crate root.
Modules§
- prelude
- Common imports for backend-independent application code.
Structs§
- Attributes
- A bitflags set of requested attributes.
- Attrs
- Idiomatic metadata returned by the Rust-native path API.
- Attrs
Options - Select metadata fields and whether to follow the final symlink. Ancestor symlinks use ordinary backend path-resolution semantics.
- Capabilities
- Typed backend capabilities. Unlike the legacy integer constants, this rejects accidental mixing with unrelated bit fields.
- Copy
Option - Options for whole-file copies through
crate::api::Vfsi::vcopy. Source final symlinks are followed by default; ancestor symlinks use normal namespace resolution. This is not a snapshot. When preserving a source symlink, its link text is copied and an existing destination is not replaced. Destination symlinks for data copies retain normal following behavior. - Depth
Limit - Compact traversal depth: 0 through 200 are finite, larger inputs are unlimited.
The root has depth zero. Unlimited depth does not disable entry/byte budgets.
Both this type and
Option<DepthLimit>occupy one byte. - DirEntry
- One native directory entry with its already-fetched metadata.
- Directory
Listing - One directory and its entries, with attributes fetched during enumeration.
- Filesystem
Stats - Filesystem capacity and limits for the filesystem containing a target.
Values are observations, not reservations.
Nonemeans unknown or unsupported. Byte counts use the filesystem allocation unit, not its preferred I/O size. - List
DirOptions - Shared directory traversal policy for collection and paged visiting. Defaults to immediate children only. Collection retains native batching; visiting delivers owned directory pages incrementally through callbacks. Unspecified budgets inherit the client’s resource limits.
- Metadata
Update - Rust-native metadata changes used by
Backend. - Open
Flags - Typed file-open behavior for the Rust-native API.
- OpenOp
- 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
DirOptions - Resource limits for one allocating directory listing.
- Read
Into Result - Application result for one read into caller storage, in request order.
- ReadOp
- One consuming read operation. Construction performs no I/O or allocation.
Caller buffers are borrowed only until
Vfsi::vreadreturns, including on errors. - Read
Options - Aggregate logical byte budget, defaulting to the client’s policy (16 MiB). Range request lengths must fit even if EOF returns fewer bytes. Complete files share the remaining returned-data budget and fail rather than truncate.
- Read
Result - Progress for one operation, with no borrowed references to caller storage.
- Remove
Options - Options controlling recursive removal.
- Resource
Limits - Default resource policy for a client. Per-call options override it. Byte limits bound logical payload, not allocator capacity or RPC overhead.
- Stream
Options - Tuning options for bounded single-file streaming reads.
- Walk
Event - Root is depth zero. Symlinks are Entry events and are never followed.
- Walk
Options - Resource limits for an allocating recursive directory walk.
- WriteOp
- A positional write borrowing its handle and payload without copying either. Construction performs no I/O or allocation. Does not change the file cursor.
- Write
Options - Policy for positional vector writes. Defaults to reporting short writes. Completion is not atomicity, durability, or permission to replay failed RPCs.
- Write
Result - Application result for one positional vector write, in request order.
Enums§
- Control
Flow - Used to tell an operation whether it should exit early or go on as usual.
- Error
Domain - Namespace in which a status code is meaningful.
- Error
Kind - A list specifying general categories of I/O error.
- File
Type - The NFSv4 object type, replacing the raw
NF4*wire codes inVfAttrs::ftype. - Metadata
Target - A path or an opened object for an attribute update. Handle targets retain
object identity across rename/unlink;
follow_symlinksapplies only to paths. - Remove
Mode - What each input to
Vfsi::vremoveremoves. - Rename
Options - Per-pair rename semantics requested by
Vfsi::vrename. - Status
Code - Typed protocol/filesystem status. Transport failures have no status.
- Stream
Completion - Completion of a streaming read. Stopping does not mean EOF.
- Transport
Kind - Transport provenance, not a guarantee that an operation is safe to retry.
Unknown failures remain
Other; messages are never parsed to classify them. - Traversal
Completion - Completion of a callback-based directory traversal.
- Walk
Control - Callback decision. Pruning never reads the directory’s contents.
- Walk
Event Kind - Enter/Leave surround a directory, including a pruned directory.
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 complete-file vector reads.
- 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 recursive walks.
Traits§
- File
Handle - Owned application file. Borrowed requests preserve the file’s lifetime; clients validate connection ownership before dispatching a vector.
- Metadata
Operand - Inputs accepted by
Vfsi::vsetattrs. Paths can be passed directly; useMetadataTargetto submit handles or mixed path/handle vectors. - Vfsi
- Vectorized filesystem operations for direct and routed application clients.
Construction, builders and protocol-specific diagnostics stay concrete.
Vectors are strict, ordered results on success, not transactions: errors
can follow partially completed requests and never imply rollback.
This uses borrowed request GATs, so it is for static generic dispatch, not
dyn Vfsi. It adds no boxing, data copies or serial-loop fallbacks. - VfsiExt
- Scalar operations and convenience workflows alongside the
Vfsivectors.