#[non_exhaustive]pub struct Config {Show 14 fields
pub domain: Domain,
pub discovery: Discovery,
pub subscribe_qos: QoS,
pub pacing: Option<Pacing>,
pub stuck_timeout_ms: Option<u64>,
pub max_resubscribe_attempts: u8,
pub absent_after_ms: u64,
pub sync_timeout_ms: u64,
pub trust_session: bool,
pub link_up_discards_queued: bool,
pub max_early_values: usize,
pub max_alerts: usize,
pub max_devices: Option<usize>,
pub host_filters: Vec<String>,
}alloc only.Expand description
Controller configuration. Start from Config::wildcard,
Config::tree or Config::device and adjust the fields.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.domain: DomainTopic domain; Domain::Named "ebus" by default.
discovery: DiscoveryDiscovery mode.
subscribe_qos: QoSQoS of every subscription; ExactlyOnce by default (convention.md:45).
pacing: Option<Pacing>Subscription pacing; None subscribes every device’s property filters
with its $description.
stuck_timeout_ms: Option<u64>Milliseconds a device may wait for its retained messages before it is
resubscribed; None disables stuck healing. 10 000 by default.
max_resubscribe_attempts: u8Resubscribe attempts before a stuck device is given up; 3 by default.
absent_after_ms: u64Milliseconds after a link-up within which a known device must be heard
again, or Event::DeviceAbsent fires; 30 000 by default.
sync_timeout_ms: u64Milliseconds after a description is applied, or after a link-up, before
Event::DeviceSynced reports missing values; 10 000 by default.
trust_session: boolTrust a CONNACK with session_present: true and keep every
subscription; false (the default) re-paces as after a clean session.
link_up_discards_queued: boolThe host never sends, after a Link::Up { session_present: false },
a SUBSCRIBE the controller queued before handling it. Replay matching
then restarts at each clean link-up, so a replay lost with a
connection delays no later re-sync; false (the default) keeps the
unmatched SUBSCRIBEs across it.
max_early_values: usizeValues buffered per device before its $description arrives; 1024 by
default.
max_alerts: usizeAlerts held per device; a new alert id past it is dropped. 256 by default.
max_devices: Option<usize>Most devices tracked at once; None (the default) is unbounded.
host_filters: Vec<String>Filters the host subscribes on the same client. The controller never unsubscribes them.
Implementations§
Source§impl Config
impl Config
Sourcepub fn tree(root: &str) -> Result<Self, ConfigError>
pub fn tree(root: &str) -> Result<Self, ConfigError>
Tree discovery from root, otherwise as Config::wildcard.
Sourcepub fn device(id: &str) -> Result<Self, ConfigError>
pub fn device(id: &str) -> Result<Self, ConfigError>
Single-device discovery of id, otherwise as Config::wildcard.