Skip to main content

ZfsEngine

Trait ZfsEngine 

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

Source

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

fn create(&self, _request: CreateDatasetRequest) -> Result<()>

Create a new dataset.

Source

fn snapshot( &self, _snapshots: &[PathBuf], _user_properties: Option<HashMap<String, String>>, ) -> Result<()>

Create snapshots as one atomic operation.

Source

fn bookmark(&self, _snapshots: &[BookmarkRequest]) -> Result<()>

Create bookmarks as one atomic operation.

Source

fn destroy<N: Into<PathBuf>>(&self, _name: N) -> Result<()>

Deletes the dataset Deletes the dataset

Source

fn destroy_snapshots( &self, _snapshots: &[PathBuf], _timing: DestroyTiming, ) -> Result<()>

Delete snapshots as one atomic operation

Source

fn destroy_bookmarks(&self, _bookmarks: &[PathBuf]) -> Result<()>

Delete bookmarks as one atomic operation

Source

fn list<N: Into<PathBuf>>( &self, _pool: N, ) -> Result<Vec<(DatasetKind, PathBuf)>>

Source

fn list_filesystems<N: Into<PathBuf>>(&self, _pool: N) -> Result<Vec<PathBuf>>

Source

fn list_snapshots<N: Into<PathBuf>>(&self, _pool: N) -> Result<Vec<PathBuf>>

Source

fn list_bookmarks<N: Into<PathBuf>>(&self, _pool: N) -> Result<Vec<PathBuf>>

Source

fn list_volumes<N: Into<PathBuf>>(&self, _pool: N) -> Result<Vec<PathBuf>>

Source

fn read_properties<N: Into<PathBuf>>(&self, _path: N) -> Result<Properties>

Read all properties of filesystem/volume/snapshot/bookmark.

Source

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.

Source

fn send_incremental<N: Into<PathBuf>, F: Into<PathBuf>, FD: AsRawFd>( &self, _path: N, _from: F, _fd: FD, _flags: SendFlags, ) -> Result<()>

Send an incremental snapshot to a specified file descriptor.

Source

fn run_channel_program<N: Into<PathBuf>>( &self, _pool: N, _program: &str, _instr_limit: u64, _mem_limit: u64, _sync: bool, _args: NvList, ) -> Result<NvList>

Run a channel program

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§