mirror of
https://github.com/mii443/merkle.rs.git
synced 2025-08-22 16:05:30 +00:00
Fix naming from digest to algorithm in documentation.
Thanks @Liamsi for catching that.
This commit is contained in:
@ -65,7 +65,7 @@ its children nodes.</p>
|
||||
title='merkle::Proof'>Proof</a></td>
|
||||
<td class='docblock-short'>
|
||||
<p>An inclusion proof represent the fact that a <code>value</code> is a member
|
||||
of a <code>MerkleTree</code> with root hash <code>root_hash</code>, and hash function <code>digest</code>.</p>
|
||||
of a <code>MerkleTree</code> with root hash <code>root_hash</code>, and hash function <code>algorithm</code>.</p>
|
||||
</td>
|
||||
</tr></table></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
@ -1 +1 @@
|
||||
initSidebarItems({"struct":[["MerkleTree","A Merkle tree is a binary tree, with values of type `T` at the leafs, and where every node holds the hash of the concatenation of the hashes of its children nodes."],["Proof","An inclusion proof represent the fact that a `value` is a member of a `MerkleTree` with root hash `root_hash`, and hash function `digest`."]]});
|
||||
initSidebarItems({"struct":[["MerkleTree","A Merkle tree is a binary tree, with values of type `T` at the leafs, and where every node holds the hash of the concatenation of the hashes of its children nodes."],["Proof","An inclusion proof represent the fact that a `value` is a member of a `MerkleTree` with root hash `root_hash`, and hash function `algorithm`."]]});
|
@ -54,7 +54,7 @@
|
||||
pub lemma: Lemma,
|
||||
pub value: T,
|
||||
}</pre><div class='docblock'><p>An inclusion proof represent the fact that a <code>value</code> is a member
|
||||
of a <code>MerkleTree</code> with root hash <code>root_hash</code>, and hash function <code>digest</code>.</p>
|
||||
of a <code>MerkleTree</code> with root hash <code>root_hash</code>, and hash function <code>algorithm</code>.</p>
|
||||
</div><h2 class='fields'>Fields</h2><span id='structfield.algorithm' class='structfield'>
|
||||
<span id='algorithm.v' class='invisible'>
|
||||
<code>algorithm: &'static <a class='struct' href='https://briansmith.org/rustdoc/ring/digest/struct.Algorithm.html' title='ring::digest::Algorithm'>Algorithm</a></code>
|
||||
|
@ -1,3 +1,3 @@
|
||||
var searchIndex = {};
|
||||
searchIndex["merkle"] = {"doc":"*merkle* implements a Merkle Tree in Rust.","items":[[3,"MerkleTree","merkle","A Merkle tree is a binary tree, with values of type `T` at the leafs,\nand where every node holds the hash of the concatenation of the hashes of\nits children nodes.",null,null],[12,"algorithm","","The hashing algorithm used by this Merkle tree",0,null],[3,"Proof","","An inclusion proof represent the fact that a `value` is a member\nof a `MerkleTree` with root hash `root_hash`, and hash function `digest`.",null,null],[12,"algorithm","","The hashing algorithm used in the original `MerkleTree`",1,null],[12,"root_hash","","The hash of the root of the original `MerkleTree`",1,null],[12,"lemma","","The first `Lemma` of the `Proof`",1,null],[12,"value","","The value concerned by this `Proof`",1,null],[11,"clone","","",0,null],[11,"fmt","","",0,null],[11,"from_vec","","Constructs a Merkle Tree from a vector of data blocks.\nReturns None if `values` is empty.",0,{"inputs":[{"name":"algorithm"},{"name":"vec"}],"output":{"name":"option"}}],[11,"root_hash","","Returns the root hash of Merkle tree",0,null],[11,"height","","Returns the height of Merkle tree",0,null],[11,"count","","Returns the number of leaves in the Merkle tree",0,null],[11,"gen_proof","","Generate an inclusion proof for the given value.\nReturns `None` if the given value is not found in the tree.",0,null],[11,"clone","","",1,null],[11,"fmt","","",1,null],[11,"new","","Constructs a new `Proof`",1,{"inputs":[{"name":"algorithm"},{"name":"vec"},{"name":"lemma"},{"name":"t"}],"output":{"name":"self"}}],[11,"validate","","Checks whether this inclusion proof is well-formed,\nand whether its root hash matches the given `root_hash`.",1,null]],"paths":[[3,"MerkleTree"],[3,"Proof"]]};
|
||||
searchIndex["merkle"] = {"doc":"*merkle* implements a Merkle Tree in Rust.","items":[[3,"MerkleTree","merkle","A Merkle tree is a binary tree, with values of type `T` at the leafs,\nand where every node holds the hash of the concatenation of the hashes of\nits children nodes.",null,null],[12,"algorithm","","The hashing algorithm used by this Merkle tree",0,null],[3,"Proof","","An inclusion proof represent the fact that a `value` is a member\nof a `MerkleTree` with root hash `root_hash`, and hash function `algorithm`.",null,null],[12,"algorithm","","The hashing algorithm used in the original `MerkleTree`",1,null],[12,"root_hash","","The hash of the root of the original `MerkleTree`",1,null],[12,"lemma","","The first `Lemma` of the `Proof`",1,null],[12,"value","","The value concerned by this `Proof`",1,null],[11,"clone","","",0,null],[11,"fmt","","",0,null],[11,"from_vec","","Constructs a Merkle Tree from a vector of data blocks.\nReturns None if `values` is empty.",0,{"inputs":[{"name":"algorithm"},{"name":"vec"}],"output":{"name":"option"}}],[11,"root_hash","","Returns the root hash of Merkle tree",0,null],[11,"height","","Returns the height of Merkle tree",0,null],[11,"count","","Returns the number of leaves in the Merkle tree",0,null],[11,"gen_proof","","Generate an inclusion proof for the given value.\nReturns `None` if the given value is not found in the tree.",0,null],[11,"clone","","",1,null],[11,"fmt","","",1,null],[11,"new","","Constructs a new `Proof`",1,{"inputs":[{"name":"algorithm"},{"name":"vec"},{"name":"lemma"},{"name":"t"}],"output":{"name":"self"}}],[11,"validate","","Checks whether this inclusion proof is well-formed,\nand whether its root hash matches the given `root_hash`.",1,null]],"paths":[[3,"MerkleTree"],[3,"Proof"]]};
|
||||
initSearch(searchIndex);
|
||||
|
@ -191,7 +191,6 @@
|
||||
<span id="147">147</span>
|
||||
<span id="148">148</span>
|
||||
<span id="149">149</span>
|
||||
<span id="150">150</span>
|
||||
</pre><pre class='rust '>
|
||||
|
||||
<span class='kw'>use</span> <span class='ident'>ring</span>::<span class='ident'>digest</span>::<span class='ident'>Algorithm</span>;
|
||||
@ -200,7 +199,7 @@
|
||||
<span class='kw'>use</span> <span class='ident'>hashutils</span>::<span class='ident'>HashUtils</span>;
|
||||
|
||||
<span class='doccomment'>/// An inclusion proof represent the fact that a `value` is a member</span>
|
||||
<span class='doccomment'>/// of a `MerkleTree` with root hash `root_hash`, and hash function `digest`.</span>
|
||||
<span class='doccomment'>/// of a `MerkleTree` with root hash `root_hash`, and hash function `algorithm`.</span>
|
||||
<span class='attribute'>#[<span class='ident'>derive</span>(<span class='ident'>Clone</span>, <span class='ident'>Debug</span>)]</span>
|
||||
<span class='kw'>pub</span> <span class='kw'>struct</span> <span class='ident'>Proof</span><span class='op'><</span><span class='ident'>T</span><span class='op'>></span> {
|
||||
|
||||
@ -342,7 +341,6 @@
|
||||
<span class='doccomment'>/// The value was found in the right branch</span>
|
||||
<span class='ident'>Right</span>(<span class='ident'>T</span>)
|
||||
}
|
||||
|
||||
</pre>
|
||||
</section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
@ -5,7 +5,7 @@ use tree::Tree;
|
||||
use hashutils::HashUtils;
|
||||
|
||||
/// An inclusion proof represent the fact that a `value` is a member
|
||||
/// of a `MerkleTree` with root hash `root_hash`, and hash function `digest`.
|
||||
/// of a `MerkleTree` with root hash `root_hash`, and hash function `algorithm`.
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Proof<T> {
|
||||
|
||||
@ -147,4 +147,3 @@ pub enum Positioned<T> {
|
||||
/// The value was found in the right branch
|
||||
Right(T)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user