pub struct TestVector {
pub scheme: SchemeSpec,
pub test: TestVectorTest,
pub peer_behavior: Vec<PeerBehaviorEntry>,
pub conformance_level: ConformanceLevel,
pub reference: Option<String>,
pub expected_round_count: Option<u8>,
pub share_material: Option<String>,
}Expand description
Top-level TOML document.
Fields§
§scheme: SchemeSpec§test: TestVectorTest§peer_behavior: Vec<PeerBehaviorEntry>§conformance_level: ConformanceLevelNIST-style conformance classification for this vector. Defaults
to MustPass when absent so the schema remains strict-by-default.
reference: Option<String>Optional URL pointing at the normative reference (spec section, RFC, NIST publication) this vector exercises. Carried through to the report so NIST can attribute every measurement to its source.
expected_round_count: Option<u8>Optional: the number of rounds a compliant implementation is expected to take. When set, the runner warns if the observed round count differs (but never fails on it alone).
Optional: the label of the pre-shared key material to feed into
each party’s local_share. NIST publishes named DKG outputs;
this field lets a vector reference them by name rather than
inlining bytes. The harness resolves the label to bytes via the
environment (test fixture or registry lookup).
Implementations§
Source§impl TestVector
impl TestVector
Sourcepub fn parse(toml_str: &str) -> Result<Self>
pub fn parse(toml_str: &str) -> Result<Self>
Parse a TOML document. Validates behaviors and decodes seed/message.
Sourcepub fn seed_u64(&self) -> Result<u64>
pub fn seed_u64(&self) -> Result<u64>
Decode the seed field into a u64. Accepts "0x..." hex or bare
hex; empty defaults to 0.
Sourcepub fn behavior_specs(&self) -> Vec<BehaviorSpec>
pub fn behavior_specs(&self) -> Vec<BehaviorSpec>
Convert the parsed vector into BehaviorSpecs for the
crate::ByzantineTransport.
Trait Implementations§
Source§impl Clone for TestVector
impl Clone for TestVector
Source§fn clone(&self) -> TestVector
fn clone(&self) -> TestVector
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TestVector
impl Debug for TestVector
Source§impl<'de> Deserialize<'de> for TestVector
impl<'de> Deserialize<'de> for TestVector
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for TestVector
Source§impl PartialEq for TestVector
impl PartialEq for TestVector
Source§fn eq(&self, other: &TestVector) -> bool
fn eq(&self, other: &TestVector) -> bool
self and other values to be equal, and is used by ==.