pub struct ChannelDef {
pub name: String,
pub schema_ref: Option<PathBuf>,
pub durable: bool,
pub loaded_schema: Option<LoadedSchema>,
}Expand description
Declarative channel definition loaded from server configuration.
Fields§
§name: StringUnique channel name used by routing rules and operators.
schema_ref: Option<PathBuf>Filesystem path to a JSON Schema document that validates every message published to this channel.
The path is resolved relative to the directory containing the config file
(absolute paths are used verbatim). Config validation reads and parses the
referenced document and stores the result in Self::loaded_schema; a
missing file, an unreadable file, or a file that is not valid JSON is an
accumulated validation error that stops startup.
None means the channel has no schema: it keeps the permissive empty
schema ({}) that accepts any JSON payload.
durable: boolWhether this channel requires durable persistence.
loaded_schema: Option<LoadedSchema>Schema document loaded and parsed from Self::schema_ref during config
validation. Populated only by crate::config::validate; a directly
constructed ChannelDef that skips validation carries None here and is
therefore built with the permissive empty schema regardless of
Self::schema_ref. Never deserialized from the config file.
Trait Implementations§
Source§impl Clone for ChannelDef
impl Clone for ChannelDef
Source§fn clone(&self) -> ChannelDef
fn clone(&self) -> ChannelDef
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more