Skip to main content

parse_schema

Function parse_schema 

Source
pub fn parse_schema(
    schema_bytes: &[u8],
    root_msg_name: &str,
) -> Result<ParsedSchema, SchemaError>
Expand description

Parse schema_bytes into a ParsedSchema.

Tries FileDescriptorSet first, falls back to FileDescriptorProto, mirroring the Python load_schema_descriptor behaviour.

An empty schema_bytes or empty root_msg_name returns a schema whose root_schema() is None (no-schema mode).