20 lines
541 B
Rust
20 lines
541 B
Rust
use crate::app::Enableable;
|
|
use crate::config::types::{AbsoluteDownloadDir, Host, Password, Port, Username};
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
/// Configuration for the Transmission action
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct TransmissionConfig {
|
|
pub enable: bool,
|
|
pub host: Host,
|
|
pub username: Username,
|
|
pub password: Password,
|
|
pub port: Port,
|
|
pub download_dir: AbsoluteDownloadDir,
|
|
}
|
|
|
|
impl Enableable for TransmissionConfig {
|
|
fn is_enabled(&self) -> bool {
|
|
self.enable
|
|
}
|
|
}
|