Skip to main content

GeneralConfig

Struct GeneralConfig 

Source
pub struct GeneralConfig {
Show 20 fields pub listen_addr: String, pub port: u16, pub api_key: Option<String>, pub incomplete_dir: PathBuf, pub complete_dir: PathBuf, pub data_dir: PathBuf, pub speed_limit_bps: u64, pub cache_size: u64, pub log_level: String, pub log_file: Option<PathBuf>, pub history_retention: Option<usize>, pub max_active_downloads: usize, pub min_free_space_bytes: u64, pub watch_dir: Option<PathBuf>, pub rss_history_limit: Option<usize>, pub direct_unpack: bool, pub abort_hopeless: bool, pub early_failure_check: bool, pub required_completion_pct: f64, pub article_timeout_secs: u64,
}

Fields§

§listen_addr: String

HTTP API listen address

§port: u16

HTTP API port

§api_key: Option<String>

API key for authentication

§incomplete_dir: PathBuf

Directory for incomplete downloads

§complete_dir: PathBuf

Directory for completed downloads

§data_dir: PathBuf

Directory for application data (DB, logs)

§speed_limit_bps: u64

Download speed limit in bytes/sec (0 = unlimited)

§cache_size: u64

Article cache size in bytes

§log_level: String

Log level

§log_file: Option<PathBuf>

Log file path (None = stdout only)

§history_retention: Option<usize>

History retention: how many NZBs to keep in history (None = keep all)

§max_active_downloads: usize

Max number of NZBs downloading simultaneously (default 1)

§min_free_space_bytes: u64

Minimum free disk space in bytes before pausing downloads (default 1 GB)

§watch_dir: Option<PathBuf>

Directory to watch for new .nzb files to auto-enqueue

§rss_history_limit: Option<usize>

RSS feed history limit: how many feed items to keep (None = keep all, default 500)

§direct_unpack: bool

Begin extracting RAR volumes during download instead of waiting for the job to complete. Requires unrar on PATH. Falls back to normal post-processing if articles fail or unrar is unavailable.

§abort_hopeless: bool

Abort downloads that cannot possibly complete (too many missing articles). When enabled, the engine checks article failure rates and cancels jobs that have no chance of success. Default: true.

§early_failure_check: bool

Quick initial check: after the first N articles have been attempted, abort if the failure rate exceeds 80%. Catches completely dead NZBs within seconds instead of grinding through thousands of articles. Requires abort_hopeless to also be enabled. Default: true.

§required_completion_pct: f64

Minimum completion percentage required to keep downloading (excluding par2 repair files). If the ratio of available content bytes to total content bytes drops below this value, the job is aborted. Range: 100.0–200.0. Default: 100.2 (par2 overhead means slight over-completion is normal).

§article_timeout_secs: u64

Maximum time in seconds to wait for a single NNTP article response before treating the connection as stalled and reconnecting. 0 = no timeout. Default: 30.

Trait Implementations§

Source§

impl Clone for GeneralConfig

Source§

fn clone(&self) -> GeneralConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GeneralConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for GeneralConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for GeneralConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for GeneralConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,