Files
One-KVM/src/otg/function.rs

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<()>;
}