Skip to main content

parse

Function parse 

Source
pub fn parse(src: &str) -> Result<Schema, ParseError>
Expand description

Parse a KDL schema source string into a Schema. Pure text in, pure value out — no filesystem access, no directive resolution.

§Errors

Returns ParseError::Kdl if the input is not well-formed KDL or does not match the schema shape, and ParseError::Validation if it parses but breaks a schema rule (e.g. a datagram channel without a channel_id).