Skip to main content

Crate vnfs

Crate vnfs 

Source
Expand description

VFSI compatibility facade.

The published vnfs package retains its historical paths while the implementation is split into interface and backend workspace crates.

Modules§

dummy_vecfs
error
Shared low-level error compatibility path.
path
Byte-preserving path helpers for Unix-native Path/OsStr types.
sfsi
Scalar/singular synchronous API facet.
vecfs
Synchronous vector interface compatibility path.
vfsi
Vectorized synchronous API facet.

Structs§

Adb
An Application Data Block (ADB) pattern, mirroring struct tc_adb.
AttrMask
A bitflags set of requested attributes.
DummyVecFs
A local-filesystem VecFs. "/" is the root directory.
ExtentPair
One extent to copy, mirroring struct tc_extent_pair.
ReadOp
One element of a batched read, replacing the C tc_iovec (which mixed input and output fields in a single mutable struct).
ReadResult
The result of one ReadOp: the data and whether end-of-file was hit. file echoes the request’s file reference so results can be paired back to mixed fd/path inputs without reordering assumptions.
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.
VfAttrs
File attributes, mirroring struct tc_attrs. mode is the full st_mode (permission bits plus S_IFMT file-type bits); the mtime/atime/ctime fields hold seconds and nanoseconds.
WalkEntry
A directory and its entries, as returned by a filesystem walk. path is the directory’s root-relative path; entries are its immediate children.
WriteOp
One element of a batched write.
WriteResult
The result of one WriteOp. file echoes the request’s file reference.

Enums§

SeekFrom
How filesystem seek operations interpret their offset, mirroring SEEK_SET / SEEK_CUR / SEEK_END as an enum.
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_file tagged struct (type + fd + path), where the variant is the tag.
VfOffset
The offset of a read or write operation.
VfPathBase
The base a path is resolved against, replacing the C VF_FD_CWD / VF_FD_ABS sentinel descriptors.
VfType
The NFSv4 object type, replacing the raw NF4* wire codes in VfAttrs::ftype.

Constants§

ERR_ACCES
ERR_EBADF
ERR_EXIST
ERR_INVAL
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 (lstat semantics).
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§

VecFs
A vectorized filesystem: many small operations coalesced into as few round trips as the backend supports.
VecFsExt
AsRef<Path> convenience wrappers for VecFs methods.

Functions§

rm_recursive
tc_rm_recursive().

Type Aliases§

Fd
An open file descriptor (backend-assigned), the Rust spelling of the C int fd.
ReadStreamCallback
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