Crate correlationvector_rust

Crate correlationvector_rust 

Source
Expand description

A rust library for working with Correlation Vectors. The library provides a struct for CorrelationVector and methods for working with them. Learn more about the methods in the Readme or in the specification.

use cvlib::CorrelationVector;

let mut cv = CorrelationVector::new(); // e.g. wC71fJEqSPuHrPQ9ZoXrKg.0
cv.extend(); // e.g. wC71fJEqSPuHrPQ9ZoXrKg.0.0
cv.increment(); // e.g. wC71fJEqSPuHrPQ9ZoXrKg.0.1
let cv_string = cv.to_string(); // create string representation of CV

let cv_parsed = CorrelationVector::parse(&cv_string); // parse the string representation of the correlation vector

Structs§

CorrelationVector
The Correlation Vector struct
SpinParams
The parameters for the spin operation

Enums§

CorrelationVectorParseError
The error type for CorrelationVector::parse
SpinCounterInterval
The number of ticks to drop from the UTC timestamp
SpinCounterPeriodicity
The number of bits to use from the UTC timestamp
SpinEntropy
How many entropy bytes to use