mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-10-28 08:20:49 +08:00
16 lines
366 B
Rust
16 lines
366 B
Rust
use std::path::Path;
|
|
|
|
use crate::error::Result;
|
|
|
|
pub trait GadgetFunction: Send + Sync {
|
|
fn name(&self) -> &str;
|
|
|
|
fn create(&self, gadget_path: &Path) -> Result<()>;
|
|
|
|
fn link(&self, config_path: &Path, gadget_path: &Path) -> Result<()>;
|
|
|
|
fn unlink(&self, config_path: &Path) -> Result<()>;
|
|
|
|
fn cleanup(&self, gadget_path: &Path) -> Result<()>;
|
|
}
|