pub struct Config {Show 13 fields
pub host: String,
pub port: u16,
pub cycle_ms: u64,
pub audit_log: Option<PathBuf>,
pub tier2_period_s: f64,
pub grace_s: f64,
pub pages_file: Option<PathBuf>,
pub planner: bool,
pub whole_max_bytes: u64,
pub momentary_timeout_ms: u64,
pub plcs: IndexMap<String, PlcConfig>,
pub tokens: IndexMap<String, TokenConfig>,
pub decorators: Map<String, Value>,
}Expand description
The whole config.
Fields§
§host: StringAddress the server binds to.
port: u16Port the server binds to.
cycle_ms: u64Poll period per PLC.
audit_log: Option<PathBuf>JSON lines of every write attempt, None for none.
tier2_period_s: f64Each tier-2 tag is read about this often.
grace_s: f64A tag leaving tier 1 stays at tier 2 this long.
pages_file: Option<PathBuf>Learned page -> tags, None to keep them in memory only.
planner: boolRead structs whole when that saves reads.
whole_max_bytes: u64Largest struct the planner reads whole.
momentary_timeout_ms: u64A pressed momentary tag with no hold this long is released.
plcs: IndexMap<String, PlcConfig>The PLCs in file order.
tokens: IndexMap<String, TokenConfig>The tokens in file order.
decorators: Map<String, Value>[decorator.NAME] tables.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more