pub enum EnvelopeProofs {
Single(EnvelopeProof),
Chain(Vec<EnvelopeProof>),
}Expand description
One proof, or a two-element chain (spec §7.1.11).
Untagged because the wire carries either a JSON object or a JSON array
under the same proof key; the shape IS the discriminator.
Variants§
Single(EnvelopeProof)
A single notary proof. The envelope is NotaryAttested (§7.1.11).
Chain(Vec<EnvelopeProof>)
An ordered proof chain: principal proof, then notary countersignature.
Implementations§
Source§impl EnvelopeProofs
impl EnvelopeProofs
Sourcepub fn all(&self) -> &[EnvelopeProof]
pub fn all(&self) -> &[EnvelopeProof]
Every proof, in wire order.
Sourcepub fn principal(&self) -> Option<&EnvelopeProof>
pub fn principal(&self) -> Option<&EnvelopeProof>
The principal proof — the head of a well-formed two-element chain.
None for a single proof or a chain of any other length.
A chain of any other length is malformed under §7.1.11, so refusing to name a “principal proof” inside one is deliberate: a caller that got a proof back from a three-element array would be reading a structure the spec rejects as though it were valid.
Sourcepub fn notary(&self) -> Option<&EnvelopeProof>
pub fn notary(&self) -> Option<&EnvelopeProof>
The notary proof: the lone proof, or the tail of a two-element chain.