Enum sleep_parser::FileType[][src]

pub enum FileType {
    BitField,
    Signatures,
    Tree,
}

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

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.

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

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.

Methods

impl FileType
[src]

Returns true if the file is BitField

Returns true if the file is Signatures

Returns true if the file is Tree

Trait Implementations

impl Debug for FileType
[src]

Formats the value using the given formatter. Read more

impl PartialEq for FileType
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

impl Send for FileType

impl Sync for FileType