pub enum FileType {
    BitField,
    Signatures,
    Tree,
}
Expand description

Type of file.

signatures, bitfield and tree are the three SLEEP files. There are two additional files, key, and data, which do not contain SLEEP file headers and store plain serialized data for easy access. key stores the public key that is described by the signatures file, and data stores the raw chunk data that the tree file contains the hashes and metadata.

Variants§

§

BitField

The bitfield describes which pieces of data you have, and which nodes in the tree file have been written. This file exists as an index of the tree and data to quickly figure out which pieces of data you have or are missing. This file can be regenerated if you delete it, so it is considered a materialized index.

§

Signatures

A SLEEP formatted 32 byte header with data entries being 64 byte signatures.

§

Tree

A SLEEP formatted 32 byte header with data entries representing a serialized Merkle tree based on the data in the data storage layer. All the fixed size nodes written in in-order tree notation. The header algorithm string for tree files is BLAKE2b. The entry size is 40 bytes.

Implementations§

Returns true if the file is BitField

Returns true if the file is Signatures

Returns true if the file is Tree

Trait Implementations§

Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.