Skip to main content

VectorBackend

Trait VectorBackend 

Source
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<&VfFile, &[u8]>], ) -> VfResult<Vec<WriteResult>> { ... } fn before_open_cleanup( &mut self, _index: usize, _file: &VfFile, ) -> VfResult<()> { ... } fn vopen_raw_impl( &mut self, paths: &[&Path], flags: &[i32], modes: &[u32], ) -> VfResult<Vec<VfFile>> { ... } fn vopen_raw_simple_impl( &mut self, paths: &[&Path], flags: i32, mode: u32, ) -> VfResult<Vec<VfFile>> { ... } fn vclose_impl(&mut self, files: &[VfFile]) -> VfRes { ... } fn vopen_impl(&mut self, requests: &[OpenOp]) -> VfResult<Vec<VfFile>> { ... } 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: &VfFile) -> 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: &[(VfFile, VfFile)]) -> VfRes { ... } fn vrename_with_options_impl( &mut self, pairs: &[(VfFile, VfFile)], options: RenameOptions, ) -> VfRes { ... } fn vremove_impl(&mut self, files: &[VfFile]) -> 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: CopyOption) -> 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: &[VfFile]) -> VfResult<Vec<Vec<u8>>> { ... } fn vread_all_with_options_impl( &mut self, files: &[VfFile], options: ReadAllOptions, ) -> VfResult<Vec<Vec<u8>>> { ... } fn vstream_impl( &mut self, files: &[VfFile], 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§

Source

fn vread_impl(&mut self, reads: &[ReadOp]) -> VfResult<Vec<ReadResult>>

Provided Methods§

Source

fn vread_into_impl( &mut self, reads: &[ReadOp], buffers: &mut [&mut [u8]], ) -> VfResult<Vec<ReadIntoResult>>

Source

fn vwrite_impl( &mut self, writes: &[WriteOp<&VfFile, &[u8]>], ) -> VfResult<Vec<WriteResult>>

Execute a borrowed ordered vector. Payloads and target storage remain with the caller; implementations must not retain them after returning.

Source

fn before_open_cleanup(&mut self, _index: usize, _file: &VfFile) -> VfResult<()>

Source

fn vopen_raw_impl( &mut self, paths: &[&Path], flags: &[i32], modes: &[u32], ) -> VfResult<Vec<VfFile>>

Source

fn vopen_raw_simple_impl( &mut self, paths: &[&Path], flags: i32, mode: u32, ) -> VfResult<Vec<VfFile>>

Source

fn vclose_impl(&mut self, files: &[VfFile]) -> VfRes

Source

fn vopen_impl(&mut self, requests: &[OpenOp]) -> VfResult<Vec<VfFile>>

Open every typed request or return an error, cleaning confirmed handles. Creation and truncation effects are not rolled back.

Source

fn vgetattrs_impl(&mut self, attrs: &mut [VfAttrs]) -> VfRes

Source

fn vgetattrs_nofollow_impl(&mut self, attrs: &mut [VfAttrs]) -> VfRes

Source

fn vsetattrs_raw_impl(&mut self, attrs: &[VfAttrs]) -> VfRes

Source

fn vsetattrs_raw_nofollow_impl(&mut self, attrs: &[VfAttrs]) -> VfRes

Source

fn stat_impl(&mut self, path: &Path) -> VfResult<VfAttrs>

Source

fn lstat_impl(&mut self, path: &Path) -> VfResult<VfAttrs>

Source

fn fstat_impl(&mut self, tcf: &VfFile) -> VfResult<VfAttrs>

Source

fn exists_impl(&mut self, path: &Path) -> VfResult<bool>

Source

fn file_type_impl(&mut self, path: &Path) -> VfResult<VfType>

Source

fn metadata_path_impl(&mut self, path: &Path, follow: bool) -> VfResult<Attrs>

Source

fn set_metadata_path_impl(&mut self, op: &SetAttrsOp<&Path>) -> VfResult<()>

Source

fn listdir_impl( &mut self, dir: &Path, masks: AttrMask, max_count: usize, recursive: bool, ) -> VfResult<Vec<VfAttrs>>

Source

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.

Source

fn directory_page_batch_size(&self) -> usize

Source

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>>

Source

fn create_dir_impl(&mut self, path: &Path, mode: u32) -> VfResult<()>

Source

fn read_dir_impl( &mut self, path: &Path, options: ListDirOptions, ) -> VfResult<Vec<DirEntry>>

Source

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.

Source

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.

Source

fn walk_impl( &mut self, root: &Path, masks: AttrMask, sort: &mut dyn FnMut(&Path, &mut Vec<VfAttrs>), ) -> VfResult<Vec<WalkEntry>>

Source

fn walk_with_options_impl( &mut self, root: &Path, masks: AttrMask, options: ListDirOptions, sort: &mut dyn FnMut(&Path, &mut Vec<VfAttrs>), ) -> VfResult<Vec<WalkEntry>>

Source

fn vlistdirs_impl( &mut self, dirs: &[&Path], masks: AttrMask, max_entries: usize, recursive: bool, cb: &mut dyn FnMut(&VfAttrs, &Path) -> bool, ) -> VfRes

Source

fn visit_dir_impl( &mut self, dir: &Path, masks: AttrMask, max_entries: usize, cb: &mut dyn FnMut(&VfAttrs) -> bool, ) -> VfRes

Source

fn vrename_impl(&mut self, pairs: &[(VfFile, VfFile)]) -> VfRes

Source

fn vrename_with_options_impl( &mut self, pairs: &[(VfFile, VfFile)], options: RenameOptions, ) -> VfRes

Native atomic rename policy; never emulate no-replace with an existence check.

Source

fn vremove_impl(&mut self, files: &[VfFile]) -> VfRes

Source

fn vmkdir_impl(&mut self, dirs: &[VfAttrs]) -> VfRes

Source

fn mkdir_raw_impl(&mut self, path: &Path, mode: u32) -> VfResult<()>

Source

fn ensure_dir_impl(&mut self, dir: &Path, mode: u32) -> VfResult<()>

Source

fn remove_impl(&mut self, path: &Path, recursive: bool) -> VfResult<()>

Source

fn remove_dir_contents_impl(&mut self, path: &Path) -> VfResult<()>

Source

fn rename_impl(&mut self, from: &Path, to: &Path) -> VfResult<()>

Source

fn vcopy_data_impl(&mut self, pairs: &[ExtentPair]) -> VfRes

Source

fn vcopy_impl(&mut self, pairs: &[ExtentPair], options: CopyOption) -> VfRes

Source

fn copy_tree_impl( &mut self, src_dir: &Path, dst: &Path, symlinks: bool, use_server_side_copy: bool, ) -> VfRes

Source

fn vread_all_impl(&mut self, files: &[VfFile]) -> VfResult<Vec<Vec<u8>>>

Source

fn vread_all_with_options_impl( &mut self, files: &[VfFile], options: ReadAllOptions, ) -> VfResult<Vec<Vec<u8>>>

Source

fn vstream_impl( &mut self, files: &[VfFile], chunk_size: usize, memory_limit: usize, cb: &mut ReadStreamCallback<'_>, ) -> VfRes

Source

fn before_remove_type(&mut self, _index: usize) -> VfResult<()>

Source

fn remove_paths_impl(&mut self, objs: &[&Path], recursive: bool) -> VfRes

Source

fn remove_paths_with_options_impl( &mut self, objs: &[&Path], recursive: bool, options: RemoveOptions, ) -> VfRes

Source

fn open_dir_impl(&mut self, path: &Path) -> VfResult<VfDir>

Source

fn remove_dir_contents_handle_impl(&mut self, dir: &VfDir) -> VfRes

Source

fn remove_dir_contents_handle_with_options_impl( &mut self, dir: &VfDir, options: RemoveOptions, ) -> VfRes

Source

fn close_dir_impl(&mut self, _dir: &VfDir) -> VfResult<()>

Source

fn remove_dir_contents_path_impl(&mut self, dir: &Path) -> VfRes

Source

fn remove_dir_contents_path_with_options_impl( &mut self, dir: &Path, options: RemoveOptions, ) -> VfRes

Source

fn ensure_empty_dir_impl(&mut self, dir: &Path) -> VfRes

Source

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".

Implementors§