pub trait ZfsEngine {
Show 16 methods
// Provided methods
fn exists<N: Into<PathBuf>>(&self, _name: N) -> Result<bool> { ... }
fn create(&self, _request: CreateDatasetRequest) -> Result<()> { ... }
fn snapshot(
&self,
_snapshots: &[PathBuf],
_user_properties: Option<HashMap<String, String>>,
) -> Result<()> { ... }
fn bookmark(&self, _snapshots: &[BookmarkRequest]) -> Result<()> { ... }
fn destroy<N: Into<PathBuf>>(&self, _name: N) -> Result<()> { ... }
fn destroy_snapshots(
&self,
_snapshots: &[PathBuf],
_timing: DestroyTiming,
) -> Result<()> { ... }
fn destroy_bookmarks(&self, _bookmarks: &[PathBuf]) -> Result<()> { ... }
fn list<N: Into<PathBuf>>(
&self,
_pool: N,
) -> Result<Vec<(DatasetKind, PathBuf)>> { ... }
fn list_filesystems<N: Into<PathBuf>>(
&self,
_pool: N,
) -> Result<Vec<PathBuf>> { ... }
fn list_snapshots<N: Into<PathBuf>>(&self, _pool: N) -> Result<Vec<PathBuf>> { ... }
fn list_bookmarks<N: Into<PathBuf>>(&self, _pool: N) -> Result<Vec<PathBuf>> { ... }
fn list_volumes<N: Into<PathBuf>>(&self, _pool: N) -> Result<Vec<PathBuf>> { ... }
fn read_properties<N: Into<PathBuf>>(&self, _path: N) -> Result<Properties> { ... }
fn send_full<N: Into<PathBuf>, FD: AsRawFd>(
&self,
_path: N,
_fd: FD,
_flags: SendFlags,
) -> Result<()> { ... }
fn send_incremental<N: Into<PathBuf>, F: Into<PathBuf>, FD: AsRawFd>(
&self,
_path: N,
_from: F,
_fd: FD,
_flags: SendFlags,
) -> Result<()> { ... }
fn run_channel_program<N: Into<PathBuf>>(
&self,
_pool: N,
_program: &str,
_instr_limit: u64,
_mem_limit: u64,
_sync: bool,
_args: NvList,
) -> Result<NvList> { ... }
}Provided Methods§
Sourcefn exists<N: Into<PathBuf>>(&self, _name: N) -> Result<bool>
fn exists<N: Into<PathBuf>>(&self, _name: N) -> Result<bool>
Check if a dataset (a filesystem, or a volume, or a snapshot with the given name exists.
NOTE: Can’t be used to check for existence of bookmarks.
name- The dataset name to check.
Sourcefn create(&self, _request: CreateDatasetRequest) -> Result<()>
fn create(&self, _request: CreateDatasetRequest) -> Result<()>
Create a new dataset.
Sourcefn snapshot(
&self,
_snapshots: &[PathBuf],
_user_properties: Option<HashMap<String, String>>,
) -> Result<()>
fn snapshot( &self, _snapshots: &[PathBuf], _user_properties: Option<HashMap<String, String>>, ) -> Result<()>
Create snapshots as one atomic operation.
Sourcefn bookmark(&self, _snapshots: &[BookmarkRequest]) -> Result<()>
fn bookmark(&self, _snapshots: &[BookmarkRequest]) -> Result<()>
Create bookmarks as one atomic operation.
Sourcefn destroy<N: Into<PathBuf>>(&self, _name: N) -> Result<()>
fn destroy<N: Into<PathBuf>>(&self, _name: N) -> Result<()>
Deletes the dataset Deletes the dataset
Sourcefn destroy_snapshots(
&self,
_snapshots: &[PathBuf],
_timing: DestroyTiming,
) -> Result<()>
fn destroy_snapshots( &self, _snapshots: &[PathBuf], _timing: DestroyTiming, ) -> Result<()>
Delete snapshots as one atomic operation
Sourcefn destroy_bookmarks(&self, _bookmarks: &[PathBuf]) -> Result<()>
fn destroy_bookmarks(&self, _bookmarks: &[PathBuf]) -> Result<()>
Delete bookmarks as one atomic operation
fn list<N: Into<PathBuf>>( &self, _pool: N, ) -> Result<Vec<(DatasetKind, PathBuf)>>
fn list_filesystems<N: Into<PathBuf>>(&self, _pool: N) -> Result<Vec<PathBuf>>
fn list_snapshots<N: Into<PathBuf>>(&self, _pool: N) -> Result<Vec<PathBuf>>
fn list_bookmarks<N: Into<PathBuf>>(&self, _pool: N) -> Result<Vec<PathBuf>>
fn list_volumes<N: Into<PathBuf>>(&self, _pool: N) -> Result<Vec<PathBuf>>
Sourcefn read_properties<N: Into<PathBuf>>(&self, _path: N) -> Result<Properties>
fn read_properties<N: Into<PathBuf>>(&self, _path: N) -> Result<Properties>
Read all properties of filesystem/volume/snapshot/bookmark.
Sourcefn send_full<N: Into<PathBuf>, FD: AsRawFd>(
&self,
_path: N,
_fd: FD,
_flags: SendFlags,
) -> Result<()>
fn send_full<N: Into<PathBuf>, FD: AsRawFd>( &self, _path: N, _fd: FD, _flags: SendFlags, ) -> Result<()>
Send a full snapshot to a specified file descriptor.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".