pub trait VectorBackend: HandleBackend {
Show 67 methods
// Required method
fn vread_impl(&mut self, reads: &[ReadOp]) -> VfResult<Vec<ReadResult>>;
// Provided methods
fn vread_into_impl(
&mut self,
reads: &[ReadOp],
buffers: &mut [&mut [u8]],
) -> VfResult<Vec<ReadIntoResult>> { ... }
fn vwrite_impl(
&mut self,
writes: &[WriteOp<&FileOperand, &[u8]>],
) -> VfResult<Vec<WriteResult>> { ... }
fn before_open_cleanup(
&mut self,
_index: usize,
_file: &FileOperand,
) -> VfResult<()> { ... }
fn vopen_raw_impl(
&mut self,
paths: &[&Path],
flags: &[i32],
modes: &[u32],
) -> VfResult<Vec<FileOperand>> { ... }
fn vopen_raw_simple_impl(
&mut self,
paths: &[&Path],
flags: i32,
mode: u32,
) -> VfResult<Vec<FileOperand>> { ... }
fn vclose_impl(&mut self, files: &[FileOperand]) -> VfRes { ... }
fn vopen_impl(
&mut self,
requests: &[OpenOp<'_>],
) -> VfResult<Vec<FileOperand>> { ... }
fn vgetattrs_impl(&mut self, attrs: &mut [VfAttrs]) -> VfRes { ... }
fn vgetattrs_nofollow_impl(&mut self, attrs: &mut [VfAttrs]) -> VfRes { ... }
fn vsetattrs_raw_impl(&mut self, attrs: &[VfAttrs]) -> VfRes { ... }
fn vsetattrs_raw_nofollow_impl(&mut self, attrs: &[VfAttrs]) -> VfRes { ... }
fn stat_impl(&mut self, path: &Path) -> VfResult<VfAttrs> { ... }
fn lstat_impl(&mut self, path: &Path) -> VfResult<VfAttrs> { ... }
fn fstat_impl(&mut self, tcf: &FileOperand) -> VfResult<VfAttrs> { ... }
fn exists_impl(&mut self, path: &Path) -> VfResult<bool> { ... }
fn file_type_impl(&mut self, path: &Path) -> VfResult<VfType> { ... }
fn metadata_path_impl(
&mut self,
path: &Path,
follow: bool,
) -> VfResult<Attrs> { ... }
fn set_metadata_path_impl(&mut self, op: &SetAttrsOp<&Path>) -> VfResult<()> { ... }
fn listdir_impl(
&mut self,
dir: &Path,
masks: AttrMask,
max_count: usize,
recursive: bool,
) -> VfResult<Vec<VfAttrs>> { ... }
fn listdir_page_impl(
&mut self,
dir: &Path,
masks: AttrMask,
cursor: Option<DirPageCursor>,
page_size: usize,
max_entries: usize,
follow_symlinks: bool,
) -> VfResult<(Vec<VfAttrs>, Option<DirPageCursor>)> { ... }
fn directory_page_batch_size(&self) -> usize { ... }
fn vlistdir_pages_impl(
&mut self,
dirs: &[&Path],
masks: AttrMask,
cursors: Vec<Option<DirPageCursor>>,
page_size: usize,
max_entries: usize,
follow_symlinks: bool,
) -> VfResult<Vec<BackendDirectoryPage>> { ... }
fn create_dir_impl(&mut self, path: &Path, mode: u32) -> VfResult<()> { ... }
fn read_dir_impl(
&mut self,
path: &Path,
options: ListDirOptions,
) -> VfResult<Vec<DirEntry>> { ... }
fn read_dir_page_impl(
&mut self,
path: &Path,
cursor: Option<DirPageCursor>,
page_size: usize,
max_entries: usize,
) -> VfResult<(Vec<DirEntry>, Option<DirPageCursor>)> { ... }
fn read_dir_page_with_fields_impl(
&mut self,
path: &Path,
fields: AttrMask,
cursor: Option<DirPageCursor>,
page_size: usize,
max_entries: usize,
) -> VfResult<(Vec<DirEntry>, Option<DirPageCursor>)> { ... }
fn walk_impl(
&mut self,
root: &Path,
masks: AttrMask,
sort: &mut dyn FnMut(&Path, &mut Vec<VfAttrs>),
) -> VfResult<Vec<WalkEntry>> { ... }
fn walk_with_options_impl(
&mut self,
root: &Path,
masks: AttrMask,
options: ListDirOptions,
sort: &mut dyn FnMut(&Path, &mut Vec<VfAttrs>),
) -> VfResult<Vec<WalkEntry>> { ... }
fn vlistdirs_impl(
&mut self,
dirs: &[&Path],
masks: AttrMask,
max_entries: usize,
recursive: bool,
cb: &mut dyn FnMut(&VfAttrs, &Path) -> bool,
) -> VfRes { ... }
fn visit_dir_impl(
&mut self,
dir: &Path,
masks: AttrMask,
max_entries: usize,
cb: &mut dyn FnMut(&VfAttrs) -> bool,
) -> VfRes { ... }
fn vrename_impl(&mut self, pairs: &[(FileOperand, FileOperand)]) -> VfRes { ... }
fn vrename_with_options_impl(
&mut self,
pairs: &[(FileOperand, FileOperand)],
options: RenameMode,
) -> VfRes { ... }
fn vremove_impl(&mut self, files: &[FileOperand]) -> VfRes { ... }
fn vmkdir_impl(&mut self, dirs: &[VfAttrs]) -> VfRes { ... }
fn unlink_impl(&mut self, pathname: &Path) -> VfResult<()> { ... }
fn vunlink_impl(&mut self, pathnames: &[&Path]) -> VfRes { ... }
fn mkdir_raw_impl(&mut self, path: &Path, mode: u32) -> VfResult<()> { ... }
fn ensure_dir_impl(&mut self, dir: &Path, mode: u32) -> VfResult<()> { ... }
fn remove_impl(&mut self, path: &Path, recursive: bool) -> VfResult<()> { ... }
fn remove_dir_contents_impl(&mut self, path: &Path) -> VfResult<()> { ... }
fn rename_impl(&mut self, from: &Path, to: &Path) -> VfResult<()> { ... }
fn vsymlink_impl(&mut self, oldpaths: &[&Path], newpaths: &[&Path]) -> VfRes { ... }
fn vreadlink_impl(&mut self, paths: &[&Path]) -> VfResult<Vec<Vec<u8>>> { ... }
fn vhardlink_impl(
&mut self,
oldpaths: &[&Path],
newpaths: &[&Path],
) -> VfRes { ... }
fn symlink_raw_impl(
&mut self,
oldpath: &Path,
newpath: &Path,
) -> VfResult<()> { ... }
fn readlink_raw_impl(&mut self, path: &Path) -> VfResult<Vec<u8>> { ... }
fn symlink_impl(&mut self, target: &Path, link: &Path) -> VfResult<()> { ... }
fn hard_link_impl(&mut self, source: &Path, link: &Path) -> VfResult<()> { ... }
fn read_link_impl(&mut self, path: &Path) -> VfResult<PathBuf> { ... }
fn vcopy_data_impl(&mut self, pairs: &[ExtentPair]) -> VfRes { ... }
fn vcopy_impl(
&mut self,
pairs: &[ExtentPair],
options: CopyOptions,
) -> VfRes { ... }
fn copy_tree_impl(
&mut self,
src_dir: &Path,
dst: &Path,
symlinks: bool,
use_server_side_copy: bool,
) -> VfRes { ... }
fn vread_all_impl(
&mut self,
files: &[FileOperand],
) -> VfResult<Vec<Vec<u8>>> { ... }
fn vread_all_with_options_impl(
&mut self,
files: &[FileOperand],
options: ReadAllOptions,
) -> VfResult<Vec<Vec<u8>>> { ... }
fn vstream_impl(
&mut self,
files: &[FileOperand],
chunk_size: usize,
memory_limit: usize,
cb: &mut ReadStreamCallback<'_>,
) -> VfRes { ... }
fn before_remove_type(&mut self, _index: usize) -> VfResult<()> { ... }
fn remove_paths_impl(&mut self, objs: &[&Path], recursive: bool) -> VfRes { ... }
fn remove_paths_with_options_impl(
&mut self,
objs: &[&Path],
recursive: bool,
options: RemoveOptions,
) -> VfRes { ... }
fn open_dir_impl(&mut self, path: &Path) -> VfResult<VfDir> { ... }
fn remove_dir_contents_handle_impl(&mut self, dir: &VfDir) -> VfRes { ... }
fn remove_dir_contents_handle_with_options_impl(
&mut self,
dir: &VfDir,
options: RemoveOptions,
) -> VfRes { ... }
fn close_dir_impl(&mut self, _dir: &VfDir) -> VfResult<()> { ... }
fn remove_dir_contents_path_impl(&mut self, dir: &Path) -> VfRes { ... }
fn remove_dir_contents_path_with_options_impl(
&mut self,
dir: &Path,
options: RemoveOptions,
) -> VfRes { ... }
fn ensure_empty_dir_impl(&mut self, dir: &Path) -> VfRes { ... }
fn vwrite_adb_impl(&mut self, patterns: &[Adb]) -> VfResult<Vec<usize>> { ... }
}Expand description
Native vector engines and backend workflow overrides.
Vector replies preserve input order and cardinality. Indexed failures may
follow partial effects; mutations do not promise rollback or safe replay.
Optional operations report Unsupported and capability bits conservatively.
Default workflows call shared helpers; native overrides retain batching,
retained identity, resource limits, and protocol recovery behavior.
This trait is object-safe for C/Python dispatch. No blanket implementation synthesizes a complete backend from scalar methods.
Required Methods§
fn vread_impl(&mut self, reads: &[ReadOp]) -> VfResult<Vec<ReadResult>>
Provided Methods§
fn vread_into_impl( &mut self, reads: &[ReadOp], buffers: &mut [&mut [u8]], ) -> VfResult<Vec<ReadIntoResult>>
Sourcefn vwrite_impl(
&mut self,
writes: &[WriteOp<&FileOperand, &[u8]>],
) -> VfResult<Vec<WriteResult>>
fn vwrite_impl( &mut self, writes: &[WriteOp<&FileOperand, &[u8]>], ) -> VfResult<Vec<WriteResult>>
Execute a borrowed ordered vector. Payloads and target storage remain with the caller; implementations must not retain them after returning.
fn before_open_cleanup( &mut self, _index: usize, _file: &FileOperand, ) -> VfResult<()>
fn vopen_raw_impl( &mut self, paths: &[&Path], flags: &[i32], modes: &[u32], ) -> VfResult<Vec<FileOperand>>
fn vopen_raw_simple_impl( &mut self, paths: &[&Path], flags: i32, mode: u32, ) -> VfResult<Vec<FileOperand>>
fn vclose_impl(&mut self, files: &[FileOperand]) -> VfRes
Sourcefn vopen_impl(&mut self, requests: &[OpenOp<'_>]) -> VfResult<Vec<FileOperand>>
fn vopen_impl(&mut self, requests: &[OpenOp<'_>]) -> VfResult<Vec<FileOperand>>
Open every typed request or return an error, cleaning confirmed handles. Creation and truncation effects are not rolled back.
fn vgetattrs_impl(&mut self, attrs: &mut [VfAttrs]) -> VfRes
fn vgetattrs_nofollow_impl(&mut self, attrs: &mut [VfAttrs]) -> VfRes
fn vsetattrs_raw_impl(&mut self, attrs: &[VfAttrs]) -> VfRes
fn vsetattrs_raw_nofollow_impl(&mut self, attrs: &[VfAttrs]) -> VfRes
fn stat_impl(&mut self, path: &Path) -> VfResult<VfAttrs>
fn lstat_impl(&mut self, path: &Path) -> VfResult<VfAttrs>
fn fstat_impl(&mut self, tcf: &FileOperand) -> VfResult<VfAttrs>
fn exists_impl(&mut self, path: &Path) -> VfResult<bool>
fn file_type_impl(&mut self, path: &Path) -> VfResult<VfType>
fn metadata_path_impl(&mut self, path: &Path, follow: bool) -> VfResult<Attrs>
fn set_metadata_path_impl(&mut self, op: &SetAttrsOp<&Path>) -> VfResult<()>
fn listdir_impl( &mut self, dir: &Path, masks: AttrMask, max_count: usize, recursive: bool, ) -> VfResult<Vec<VfAttrs>>
Sourcefn listdir_page_impl(
&mut self,
dir: &Path,
masks: AttrMask,
cursor: Option<DirPageCursor>,
page_size: usize,
max_entries: usize,
follow_symlinks: bool,
) -> VfResult<(Vec<VfAttrs>, Option<DirPageCursor>)>
fn listdir_page_impl( &mut self, dir: &Path, masks: AttrMask, cursor: Option<DirPageCursor>, page_size: usize, max_entries: usize, follow_symlinks: bool, ) -> VfResult<(Vec<VfAttrs>, Option<DirPageCursor>)>
False requires resolving every component without following symlinks; validate-and-then-follow is not sufficient. Continuations retain the originally opened directory. Unsupported guarantees must fail closed.
fn directory_page_batch_size(&self) -> usize
fn vlistdir_pages_impl( &mut self, dirs: &[&Path], masks: AttrMask, cursors: Vec<Option<DirPageCursor>>, page_size: usize, max_entries: usize, follow_symlinks: bool, ) -> VfResult<Vec<BackendDirectoryPage>>
fn create_dir_impl(&mut self, path: &Path, mode: u32) -> VfResult<()>
fn read_dir_impl( &mut self, path: &Path, options: ListDirOptions, ) -> VfResult<Vec<DirEntry>>
Sourcefn read_dir_page_impl(
&mut self,
path: &Path,
cursor: Option<DirPageCursor>,
page_size: usize,
max_entries: usize,
) -> VfResult<(Vec<DirEntry>, Option<DirPageCursor>)>
fn read_dir_page_impl( &mut self, path: &Path, cursor: Option<DirPageCursor>, page_size: usize, max_entries: usize, ) -> VfResult<(Vec<DirEntry>, Option<DirPageCursor>)>
Adapt full-metadata paging through the field-aware hook below.
Sourcefn read_dir_page_with_fields_impl(
&mut self,
path: &Path,
fields: AttrMask,
cursor: Option<DirPageCursor>,
page_size: usize,
max_entries: usize,
) -> VfResult<(Vec<DirEntry>, Option<DirPageCursor>)>
fn read_dir_page_with_fields_impl( &mut self, path: &Path, fields: AttrMask, cursor: Option<DirPageCursor>, page_size: usize, max_entries: usize, ) -> VfResult<(Vec<DirEntry>, Option<DirPageCursor>)>
Adapt native attribute pages without materializing a full listing.
Specialized owned-page implementations should override this hook;
read_dir_page_impl forwards here with the full metadata mask.
fn walk_impl( &mut self, root: &Path, masks: AttrMask, sort: &mut dyn FnMut(&Path, &mut Vec<VfAttrs>), ) -> VfResult<Vec<WalkEntry>>
fn walk_with_options_impl( &mut self, root: &Path, masks: AttrMask, options: ListDirOptions, sort: &mut dyn FnMut(&Path, &mut Vec<VfAttrs>), ) -> VfResult<Vec<WalkEntry>>
fn vlistdirs_impl( &mut self, dirs: &[&Path], masks: AttrMask, max_entries: usize, recursive: bool, cb: &mut dyn FnMut(&VfAttrs, &Path) -> bool, ) -> VfRes
fn visit_dir_impl( &mut self, dir: &Path, masks: AttrMask, max_entries: usize, cb: &mut dyn FnMut(&VfAttrs) -> bool, ) -> VfRes
fn vrename_impl(&mut self, pairs: &[(FileOperand, FileOperand)]) -> VfRes
Sourcefn vrename_with_options_impl(
&mut self,
pairs: &[(FileOperand, FileOperand)],
options: RenameMode,
) -> VfRes
fn vrename_with_options_impl( &mut self, pairs: &[(FileOperand, FileOperand)], options: RenameMode, ) -> VfRes
Native atomic rename policy; never emulate no-replace with an existence check.
fn vremove_impl(&mut self, files: &[FileOperand]) -> VfRes
fn vmkdir_impl(&mut self, dirs: &[VfAttrs]) -> VfRes
fn unlink_impl(&mut self, pathname: &Path) -> VfResult<()>
fn vunlink_impl(&mut self, pathnames: &[&Path]) -> VfRes
fn mkdir_raw_impl(&mut self, path: &Path, mode: u32) -> VfResult<()>
fn ensure_dir_impl(&mut self, dir: &Path, mode: u32) -> VfResult<()>
fn remove_impl(&mut self, path: &Path, recursive: bool) -> VfResult<()>
fn remove_dir_contents_impl(&mut self, path: &Path) -> VfResult<()>
fn rename_impl(&mut self, from: &Path, to: &Path) -> VfResult<()>
fn vsymlink_impl(&mut self, oldpaths: &[&Path], newpaths: &[&Path]) -> VfRes
fn vreadlink_impl(&mut self, paths: &[&Path]) -> VfResult<Vec<Vec<u8>>>
fn vhardlink_impl(&mut self, oldpaths: &[&Path], newpaths: &[&Path]) -> VfRes
fn symlink_raw_impl(&mut self, oldpath: &Path, newpath: &Path) -> VfResult<()>
fn readlink_raw_impl(&mut self, path: &Path) -> VfResult<Vec<u8>>
fn symlink_impl(&mut self, target: &Path, link: &Path) -> VfResult<()>
fn hard_link_impl(&mut self, source: &Path, link: &Path) -> VfResult<()>
fn read_link_impl(&mut self, path: &Path) -> VfResult<PathBuf>
fn vcopy_data_impl(&mut self, pairs: &[ExtentPair]) -> VfRes
fn vcopy_impl(&mut self, pairs: &[ExtentPair], options: CopyOptions) -> VfRes
fn copy_tree_impl( &mut self, src_dir: &Path, dst: &Path, symlinks: bool, use_server_side_copy: bool, ) -> VfRes
fn vread_all_impl(&mut self, files: &[FileOperand]) -> VfResult<Vec<Vec<u8>>>
fn vread_all_with_options_impl( &mut self, files: &[FileOperand], options: ReadAllOptions, ) -> VfResult<Vec<Vec<u8>>>
fn vstream_impl( &mut self, files: &[FileOperand], chunk_size: usize, memory_limit: usize, cb: &mut ReadStreamCallback<'_>, ) -> VfRes
fn before_remove_type(&mut self, _index: usize) -> VfResult<()>
fn remove_paths_impl(&mut self, objs: &[&Path], recursive: bool) -> VfRes
fn remove_paths_with_options_impl( &mut self, objs: &[&Path], recursive: bool, options: RemoveOptions, ) -> VfRes
fn open_dir_impl(&mut self, path: &Path) -> VfResult<VfDir>
fn remove_dir_contents_handle_impl(&mut self, dir: &VfDir) -> VfRes
fn remove_dir_contents_handle_with_options_impl( &mut self, dir: &VfDir, options: RemoveOptions, ) -> VfRes
fn close_dir_impl(&mut self, _dir: &VfDir) -> VfResult<()>
fn remove_dir_contents_path_impl(&mut self, dir: &Path) -> VfRes
fn remove_dir_contents_path_with_options_impl( &mut self, dir: &Path, options: RemoveOptions, ) -> VfRes
fn ensure_empty_dir_impl(&mut self, dir: &Path) -> VfRes
fn vwrite_adb_impl(&mut self, patterns: &[Adb]) -> VfResult<Vec<usize>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".