Module ion_schema::schema

source ·
Expand description

Represents a Schema which is collection of zero or more TypeDefinitions. Provides functions to get the underlying TypeDefinitions from the Schema that can be used to validate an Ion value.

  • get_types: This function returns an SchemaTypeIterator which can be used to iterate over the TypeDefinitions.
  • get_type: This function requires to pass the name of a type definition that you want to use for validation. It returns the TypeDefinition if it is defined in the Schema otherwise returns None.

Structs§