vfsi_core/lib.rs
1//! Protocol-neutral vectorized filesystem contracts for the VFSI workspace.
2//!
3//! [`Vfsi`] provides native vector execution; [`VfsiExt`] adds blanket scalar
4//! conveniences and composed workflows without replacing batching with loops.
5//! Portable requests, results, options, and imports live in [`api`].
6//! No filesystem backend, RPC library, or async runtime is required.
7//! The `vnfs` crate supplies NFS clients and re-exports these same contracts.
8//!
9//! ```no_run
10//! use vfsi_core::{Vfsi, VfsiExt};
11//! fn load_parts(fs: &impl Vfsi) -> vfsi_core::api::Result<Vec<Vec<u8>>> {
12//! fs.read_files(&["/file-1", "/file-2"])
13//! }
14//! ```
15//!
16//! The other root types support backend implementation; application read/write
17//! operations should be imported from [`api`] for the portable specializations.
18//! [`api::WriteOp`] and the native [`WriteOp`] share one operation definition;
19//! their offset types preserve positional versus cursor/append semantics.
20
21mod error;
22#[doc(hidden)]
23pub mod internal;
24pub mod path;
25mod types;
26mod write;
27pub use write::WriteOp;
28
29pub use error::{RpcError, RpcResult, STATUS_TRANSPORT, TransportKind};
30pub use types::*;
31
32/// Portable application contracts, operations, options, and extension workflows.
33pub mod api;
34pub use api::{AsTarget, DirHandle, FileHandle, MkDirOp, SetAttrsOp, Target, Vfsi, VfsiExt};