#[non_exhaustive]pub struct ChannelConfig {
pub name: String,
pub schema: Schema,
pub mode: ChannelMode,
pub pressure: ChannelPressureConfig,
}Expand description
Required configuration for creating a typed channel.
SEMVER — this type takes a declared break in the next publish wave. A1
added the pressure field, and adding a field to a struct with public
fields breaks every out-of-crate struct-literal construction
(ChannelConfig { name, schema, mode } no longer compiles). There is no
version of “carry a per-channel pressure policy on the config” that avoids
it, so it is declared rather than hidden — see
docs/design/A1-DEFER-WIRING-RECORD-2026-09-01.md §6.
#[non_exhaustive] is added in the SAME wave, deliberately: the break is
already being paid, and it buys the property that no future field costs one
again. Out-of-crate construction goes through Self::new plus the
with_* builders, which is what every construction site in this workspace
already does. Reading a field is unaffected.
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.name: StringExplicit channel name.
schema: SchemaExplicit schema for validating published payloads.
mode: ChannelModeExplicit durability mode for the channel.
pressure: ChannelPressureConfigA1 pressure policy for this channel: the Defer delay-hint band and the
durable pre-append hard watermark. Defaulted by Self::new, so no
existing construction site changes; overridden with
Self::with_pressure.
Implementations§
Source§impl ChannelConfig
impl ChannelConfig
Sourcepub const fn new(name: String, schema: Schema, mode: ChannelMode) -> Self
pub const fn new(name: String, schema: Schema, mode: ChannelMode) -> Self
Creates channel configuration from its required fields, with the default A1 pressure policy.
Sourcepub const fn with_pressure(self, pressure: ChannelPressureConfig) -> Self
pub const fn with_pressure(self, pressure: ChannelPressureConfig) -> Self
Replaces this channel’s A1 pressure policy.
Trait Implementations§
Source§impl Clone for ChannelConfig
impl Clone for ChannelConfig
Source§fn clone(&self) -> ChannelConfig
fn clone(&self) -> ChannelConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more