Struct fog_pack::schema::SchemaBuilder[][src]

pub struct SchemaBuilder { /* fields omitted */ }
Expand description

Builds schemas up from Validators.

A schema can be directly made from any document, but it’s generally much easier to construct them from Validator structs and turn the result into a Document.

Implementations

Start building a new schema. Requires the validator to use for any documents adhering to this schema.

Set the schema description. This is only used for documentation purposes.

Set the default compression to use for documents adhering to this schema.

Add a new entry type to the schema, where entry is the key for the entry, validator will be used to validate each entry, and compress optionally overrides the default compression with a specific compression setting.

Set the schema name. This is only used for documentation purposes.

Add a new stored type to the schema.

Set the schema version. This is only used for documentation purposes.

Build the Schema, compiling the result into a Document

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.