Crate sleep_parser
source ·Expand description
Example
extern crate sleep_parser as sleep_parser;
use sleep_parser::{FileType, HashType, Header};
use std::fs::File;
use std::io::{BufRead, BufReader};
let file = File::open("tests/fixtures/content.bitfield").unwrap();
let mut reader = BufReader::with_capacity(32, file);
let buffer = reader.fill_buf().unwrap();
let header = Header::from_vec(&buffer).unwrap();
assert!(header.is_bitfield());
Structs
Structural representation of 32 byte SLEEP headers.
Enums
Type of file.
Algorithm used for hashing the data.
SLEEP Protocol version.
Functions
Create a new
Header
in the Bitfield
configuration.Create a new
Header
in the Signatures
configuration.Create a new
Header
in the Tree
configuration.