Crate rsure

source · []
Expand description

Rsure is a set of utilities for capturing information about files, and later verifying it is still true.

The easiest way to use Rsure is to build the rsure executable contained in this crate. This program allows you to use most of the functionality of the crate.

However, it is also possible to use the crate programmatically. At the top level of the crate as some utility functions for the most common operations.

For example, to scan a directory or do an update use update.

This example makes use of several of the building blocks necessary to use the store. First is the store itself. parse_store is able to decode options that are passed to the command line. it is also possible to build a store::Plain store directly.

Next are the tags for the snapshot. Generally, this should hold some kind of information about the snapshot itself. For the Plain store, it can be just an empty map. Other store types may require certain tags to be present.

Re-exports

pub use crate::node::fs;
pub use crate::node::load_from;
pub use crate::node::NodeWriter;
pub use crate::node::ReadIterator;
pub use crate::node::SureNode;

Modules

The sure stream.

Structs

An iterator that pulls hash from old nodes if the file is unchanged.

The HashUpdater is able to update hashes. This is the first pass.

Information about a given version in the store.

Enums

Indicator of which version of sure data to load.

Traits

A Source is something that can repeatedly give us an iterator over nodes.

Something that can store and retrieve SureTrees.

A temp file that can spawn multiple loaders.

Functions

Initialize the standard logger, based on env_logger::init(), but coordinated with any progress meters. Like init, this will panic if the logging system has already been initialized.

Parse a command line specified path to determine the parameters and type of store desired. The path can be the path to a directory. In this case, look at possible filenames to determine the other parameters. The path can also give a filename of one of the surefiles, and we will derive the name information from that.

Perform an update scan, using the given store.

Type Definitions

Tags are just key/value pairs. Both key and value should be printable strings.