Struct sleep_parser::Header[][src]

pub struct Header {
    pub file_type: FileType,
    pub protocol_version: ProtocolVersion,
    pub entry_size: u16,
    pub hash_type: HashType,
}

Structural representation of 32 byte SLEEP headers.

Fields

Type of file.

Version of the SLEEP protocol.

Size of each piece of data in the file body.

Algorithm used for hashing the content.

Methods

impl Header
[src]

Create a new Header.

Parse a 32 byte buffer slice into a valid Header.

Convert a Header into a Vec<u8>. Use this to persist a header back to disk.

Check whether the header is formatted as a .bitfield.

Check whether the header is formatted as a .signatures.

Check whether the header is formatted as a .tree.

Trait Implementations

impl Debug for Header
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Header

impl Sync for Header