pub(crate) struct UciSection {
pub(crate) schema: Vec<PathBuf>,
pub(crate) validate: String,
}Expand description
Where to find the UCI schema that drives JSON ↔ XML conversion.
The standard is not redistributed here, so the documents have to be
named explicitly. List every file the schema spans:
UCI_MessageDefinitions alone leaves the security-marking types
dangling, which is reported as an error rather than discovered later
against live traffic.
Fields§
§schema: Vec<PathBuf>XSD paths, relative to the process working directory.
Empty (the default) means no conversion and no validation. That is
fine for routing and refused when owp.xml_baseline is on.
validate: StringWhat to do about a payload that does not follow the schema: "off",
"warn", or "reject".
Stored as a string so a typo is refused with uci.validate: …
rather than a generic serde error. Ignored when no schema is
loaded. Defaults to "warn".
Implementations§
Source§impl UciSection
impl UciSection
Sourcepub(crate) fn validate_mode(&self) -> Result<ValidateMode, String>
pub(crate) fn validate_mode(&self) -> Result<ValidateMode, String>
Parses Self::validate into a ValidateMode.
§Errors
Returns an error if the string is not off, warn, or reject.