mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-05-19 05:45:01 -04:00
22 lines
442 B
Rust
22 lines
442 B
Rust
use sd_core::client::CoreClient;
|
|
use std::path::PathBuf;
|
|
|
|
#[derive(Debug, Clone, Copy, clap::ValueEnum)]
|
|
pub enum OutputFormat {
|
|
Human,
|
|
Json,
|
|
}
|
|
|
|
pub struct Context {
|
|
pub core: CoreClient,
|
|
pub format: OutputFormat,
|
|
pub data_dir: PathBuf,
|
|
pub socket_path: PathBuf,
|
|
}
|
|
|
|
impl Context {
|
|
pub fn new(core: CoreClient, format: OutputFormat, data_dir: PathBuf, socket_path: PathBuf) -> Self {
|
|
Self { core, format, data_dir, socket_path }
|
|
}
|
|
}
|