Module schema

Module schema 

Source
Expand description

SBOR Schema

Modules§

basic_well_known_types
prelude

Structs§

ArrayData
EnumVariantData
LengthValidation
Represents additional validation that should be performed on the size.
MapData
NameChangeError
NamedSchemaVersions
A list of named comparable schemas, intended to capture various versions of the same schema over time.
NovelTypeMetadata
This is the struct used in the Schema
NumericValidation
Represents additional validation that should be performed on the numeric value.
SchemaComparisonCompletenessSettings
SchemaComparisonError
SchemaComparisonMetadataSettings
SchemaComparisonResult
SchemaComparisonSettings
SchemaComparisonStructureSettings
SchemaComparisonValidationSettings
SchemaContext
SchemaV1
An array of custom type kinds, and associated extra information which can attach to the type kinds
SingleTypeSchema
A serializable record of the schema of a single type. Intended for historical backwards compatibility checking of a single type.
TupleData
TypeAggregator
TypeCollectionSchema
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.
TypeCompatibilityParameters
TypeData
Combines all data about a Type:
TypeMetadata
This enables the type to be represented as eg JSON Also used to facilitate type reconstruction
VersionedSchema
If you wish to get access to match on the versions, use .as_ref() or .as_mut().
WellKnownTypeId

Enums§

ChildNames
LocalTypeId
The TypeId which is local to a given Schema. This is the SchemaTypeLink used in a linearized Schema to link TypeKinds.
NameChange
NameChangeRule
OwnedNameChange
RustTypeId
This is a compile-time identifier for a given type, used by the type aggregator to uniquely identify a type.
SchemaComparisonErrorDetail
SchemaValidationError
SchemaVersions
TypeKind
A schema for the values that a codec can decode / views as valid
TypeKindLabel
TypeValidation
Additional validation to apply to a payload of the given type, beyond validation from the TypeKind’s type structure.
ValidationChange

Constants§

MAX_NUMBER_OF_FIELDS

Traits§

CheckedBackwardsCompatibleSchema
CheckedFixedSchema
Marker traits intended to be implemented by the SborAssert macros
ComparableSchema
Marker trait for SingleTypeSchema and TypeCollectionSchema which includes named pointers to types, and can be used for comparisons of different versions of the same schema.
CustomExtension
CustomSchema
CustomTypeKind
CustomTypeKindLabel
CustomTypeValidation
Describe
The Describe trait allows a type to describe how to interpret and validate a corresponding SBOR payload.
IntoComparableSchema
NumericValidationBound
SchemaTypeLink
Marker trait for a link between TypeKinds:
VersionedSchemaVersion

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 with add_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

Type Aliases§

AggregatorTypeData
AggregatorTypeId
A newer alias for RustTypeId.
AggregatorTypeKind
LocalTypeData
LocalTypeKind
Schema
SingleTypeSchemaCompatibilityParameters
TypeCollectionSchemaCompatibilityParameters
TypeHash