Struct fog_pack::schema::NoSchema[][src]

pub struct NoSchema;
Expand description

Validation for documents without a schema.

Not all documents adhere to a schema, but they must still be verified for correctness and be optionally compressed on encoding. This NoSchema struct acts like a Schema to accomplish this.

As schemaless documents cannot have attached entries, NoSchema does not do any entry encode/decode.

Implementations

Encode a NewDocument, returning the resulting Document’s hash and fully encoded format. Fails if the internal data isn’t actually valid fog-pack, which can sometimes happen with a bad Serialize implementation for the data.

Re-encode a validated Document, returning the resulting Document’s hash and fully encoded format.

Decode a document that doesn’t have a schema.

Decode a Document, skipping any checks of the data. This should only be run when the raw document has definitely been passed through validation before, i.e. if it is stored in a local database after going through encode_doc.

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.