khive_runtime/node_config.rs
1//! The `[channel]` section of the khive config file.
2//!
3//! A `[channel.node]` table is still accepted so an existing config file keeps
4//! loading. Its contents are held as an opaque value and are not interpreted.
5
6use serde::{Deserialize, Serialize};
7
8use crate::engine_config::ConfigError;
9
10/// The `[channel]` section of the khive config file.
11#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)]
12#[serde(deny_unknown_fields)]
13pub struct ChannelSectionConfig {
14 /// The `[channel.node]` table, when present. It is accepted as an opaque
15 /// value and nothing reads it.
16 #[serde(default)]
17 pub node: Option<toml::Value>,
18}
19
20impl ChannelSectionConfig {
21 /// Validate the section. A section that has parsed is always valid.
22 pub fn validate(&self) -> Result<(), ConfigError> {
23 Ok(())
24 }
25}