pub trait TryCommitVerify<Msg, Protocol: CommitmentProtocol>{
type Error: Error;
// Required method
fn try_commit(msg: &Msg) -> Result<Self, Self::Error>;
// Provided method
fn verify(&self, msg: &Msg) -> Result<(), VerifyError> { ... }
}
Expand description
Trait for a failable version of commit-verify scheme.
Required Associated Types§
Sourcetype Error: Error
type Error: Error
Error type that may be reported during TryCommitVerify::try_commit
.
Required Methods§
Sourcefn try_commit(msg: &Msg) -> Result<Self, Self::Error>
fn try_commit(msg: &Msg) -> Result<Self, Self::Error>
Tries to create commitment to a byte representation of a given message.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
Source§impl TryCommitVerify<MultiSource, UntaggedProtocol> for MerkleTree
§Panics
Panics if the crate is compiled without rand
feature enabled and the
MultiSource doesn’t contain a static entropy.
impl TryCommitVerify<MultiSource, UntaggedProtocol> for MerkleTree
§Panics
Panics if the crate is compiled without rand
feature enabled and the
MultiSource doesn’t contain a static entropy.