Files
tuliprox/backend/src/processing/processor/resolve_options.rs
T
euzuandGitHub 66915a306d Feature/rbac (#656)
* RBAC implementation
* Schedules config edit mode
2026-03-20 15:31:19 +01:00

30 lines
699 B
Rust

use shared::create_bitset;
create_bitset!(u8, ResolveOptionsFlags, Resolve, TmdbMissing, Probe, Background);
pub struct ResolveOptions {
pub(crate) flags: ResolveOptionsFlagsSet,
pub resolve_delay: u16,
}
impl ResolveOptions {
#[inline]
pub fn has_flag(&self, flag: ResolveOptionsFlags) -> bool {
self.flags.contains(flag)
}
#[inline]
pub fn unset_flag(&mut self, flag: ResolveOptionsFlags) {
self.flags.unset(flag);
}
}
impl Default for ResolveOptions {
fn default() -> Self {
Self {
flags: ResolveOptionsFlags::Background.into(),
resolve_delay: shared::utils::default_resolve_delay_secs(),
}
}
}