pub struct BusConfig {
pub pools: Vec<PoolConfig>,
pub limits: Option<LimitsConfig>,
}Expand description
stdio_bus JSON configuration.
Matches the C bus config schema exactly. This is the primary way to configure the bus programmatically — no config.json file needed.
§Example
use stdiobus_core::BusConfig;
let config = BusConfig {
pools: vec![stdiobus_core::PoolConfig {
id: "worker".into(),
command: "node".into(),
args: vec!["./worker.js".into()],
instances: 4,
}],
limits: None,
};Fields§
§pools: Vec<PoolConfig>Worker pool definitions (at least one required)
limits: Option<LimitsConfig>Operational limits (optional, C bus applies defaults)
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BusConfig
impl<'de> Deserialize<'de> for BusConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BusConfig
impl RefUnwindSafe for BusConfig
impl Send for BusConfig
impl Sync for BusConfig
impl Unpin for BusConfig
impl UnsafeUnpin for BusConfig
impl UnwindSafe for BusConfig
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