Expand description
SBOR Schema
Modules§
Structs§
- Array
Data - Enum
Variant Data - Length
Validation - Represents additional validation that should be performed on the size.
- MapData
- Name
Change Error - Named
Schema Versions - A list of named comparable schemas, intended to capture various versions of the same schema over time.
- Novel
Type Metadata - This is the struct used in the Schema
- Numeric
Validation - Represents additional validation that should be performed on the numeric value.
- Schema
Comparison Completeness Settings - Schema
Comparison Error - Schema
Comparison Metadata Settings - Schema
Comparison Result - Schema
Comparison Settings - Schema
Comparison Structure Settings - Schema
Comparison Validation Settings - Schema
Context - Schema
V1 - An array of custom type kinds, and associated extra information which can attach to the type kinds
- Single
Type Schema - A serializable record of the schema of a single type. Intended for historical backwards compatibility checking of a single type.
- Tuple
Data - Type
Aggregator - Type
Collection Schema - A serializable record of the schema of a set of named types. Intended for historical backwards compatibility of a collection of types in a single schema.
- Type
Compatibility Parameters - Type
Data - Combines all data about a Type:
- Type
Metadata - This enables the type to be represented as eg JSON Also used to facilitate type reconstruction
- Versioned
Schema - If you wish to get access to match on the versions, use
.as_ref()
or.as_mut()
. - Well
Known Type Id
Enums§
- Child
Names - Local
Type Id - The TypeId which is local to a given
Schema
. This is theSchemaTypeLink
used in a linearizedSchema
to linkTypeKind
s. - Name
Change - Name
Change Rule - Owned
Name Change - Rust
Type Id - This is a compile-time identifier for a given type, used by the type aggregator to uniquely identify a type.
- Schema
Comparison Error Detail - Schema
Validation Error - Schema
Versions - Type
Kind - A schema for the values that a codec can decode / views as valid
- Type
Kind Label - Type
Validation - Additional validation to apply to a payload of the given type, beyond validation from the
TypeKind
’s type structure. - Validation
Change
Constants§
Traits§
- Checked
Backwards Compatible Schema - Checked
Fixed Schema - Marker traits intended to be implemented by the SborAssert macros
- Comparable
Schema - Marker trait for
SingleTypeSchema
andTypeCollectionSchema
which includes named pointers to types, and can be used for comparisons of different versions of the same schema. - Custom
Extension - Custom
Schema - Custom
Type Kind - Custom
Type Kind Label - Custom
Type Validation - Describe
- The
Describe
trait allows a type to describe how to interpret and validate a corresponding SBOR payload. - Into
Comparable Schema - Numeric
Validation Bound - Schema
Type Link - Marker trait for a link between
TypeKind
s: - Versioned
Schema Version
Functions§
- assert_
type_ backwards_ compatibility - Designed for ensuring a type is only altered in ways which ensure backwards compatibility in SBOR serialization (i.e. that old payloads can be deserialized correctly by the latest type).
- assert_
type_ collection_ backwards_ compatibility - Designed for ensuring a type collection is only altered in ways which ensure backwards compatibility in SBOR serialization (i.e. that old payloads of named types can be deserialized correctly by the latest schema).
- compare_
single_ type_ schemas - Designed for basic comparisons between two types, e.g. equality checking.
- compare_
type_ collection_ schemas - Designed for basic comparisons between two type collection schemas, e.g. equality checking.
- generate_
full_ schema - You may wish to use the newer
aggregator.generate_type_collection_schema()
which, in tandom withadd_named_root_type_and_descendents
also captures named root types to give more structure to enable schema comparisons over time. - generate_
full_ schema_ from_ single_ type - generate_
single_ type_ schema - localize_
well_ known - localize_
well_ known_ type_ data - resolve_
local_ type_ id - validate_
childless_ metadata - validate_
custom_ type_ validation - validate_
enum_ metadata - validate_
field_ names - validate_
index - validate_
schema - validate_
schema_ enum_ variant_ name - validate_
schema_ field_ name - validate_
schema_ type_ name - validate_
tuple_ metadata - validate_
type_ kind - validate_
type_ metadata_ with_ type_ kind