diff --git a/help.html b/help.html index ae5d60832..d10e5d16e 100644 --- a/help.html +++ b/help.html @@ -1 +1 @@ -
Use crypto_kx
to derive shared session secrets and use symmetric AEAD
+
Use crypto_kx
to derive shared session secrets and use symmetric AEAD
(xchacha20poly1305
) for authenticated encryption with associated data.
We only provide an ultra-thin wrapper for stable APIs for jellyfish users, independent of RustCrypto’s upstream changes.
diff --git a/jf_aead/struct.AEADError.html b/jf_aead/struct.AEADError.html index e66c87a4a..b6a89ebbc 100644 --- a/jf_aead/struct.AEADError.html +++ b/jf_aead/struct.AEADError.html @@ -1,24 +1,26 @@ -pub struct AEADError;
AEAD Error.
-self
and other
) and is used by the <=
-operator. Read moreCalls U::from(self)
.
pub struct AEADError;
AEAD Error.
+self
and other
) and is used by the <=
+operator. Read moreclone_to_uninit
)clone_to_uninit
)pub struct Ciphertext { /* private fields */ }
The ciphertext produced by AEAD encryption
-pub struct Ciphertext { /* private fields */ }
The ciphertext produced by AEAD encryption
+source
. Read moreself
and other
values to be equal, and is used
-by ==
.source
. Read moreself
and other
values to be equal, and is used
+by ==
.clone_to_uninit
)From<T> for U
chooses to do.
+pub struct EncKey(/* private fields */);
Public/encryption key for AEAD
+pub struct EncKey(/* private fields */);
Public/encryption key for AEAD
Encrypt a message with authenticated associated data which is an + message: &[u8], + aad: &[u8], +) -> Result<Ciphertext, AEADError>
Encrypt a message with authenticated associated data which is an optional bytestring which is not encrypted, but is authenticated along with the message. Failure to pass the same AAD that was used during encryption will cause decryption to fail, which is useful if you would like to “bind” the ciphertext to some identifier, like a digital signature key.
-clone_to_uninit
)From<T> for U
chooses to do.
+pub struct KeyPair { /* private fields */ }
Keypair for Authenticated Encryption with Associated Data
-Randomly sample a key pair.
+pub struct KeyPair { /* private fields */ }
Keypair for Authenticated Encryption with Associated Data
+clone_to_uninit
)From<T> for U
chooses to do.
+Trait definition for cryptographic commitment scheme
+Trait definition for cryptographic commitment scheme
pub trait CommitmentScheme {
+CommitmentScheme in jf_commitment - Rust Trait jf_commitment::CommitmentScheme
source · pub trait CommitmentScheme {
type Input;
- type Output: Clone + Debug + PartialEq + Eq + Hash;
- type Randomness: Clone + Debug + PartialEq + Eq + UniformRand;
- type Error: Error;
+ type Output: Clone + Debug + PartialEq + Eq + Hash;
+ type Randomness: Clone + Debug + PartialEq + Eq + UniformRand;
+ type Error: Error;
// Required methods
- fn commit<T: Borrow<Self::Input>>(
+ fn commit<T: Borrow<Self::Input>>(
input: T,
- r: Option<&Self::Randomness>,
- ) -> Result<Self::Output, Self::Error>;
- fn verify<T: Borrow<Self::Input>>(
+ r: Option<&Self::Randomness>,
+ ) -> Result<Self::Output, Self::Error>;
+ fn verify<T: Borrow<Self::Input>>(
input: T,
- r: Option<&Self::Randomness>,
+ r: Option<&Self::Randomness>,
comm: &Self::Output,
- ) -> Result<Result<(), ()>, Self::Error>;
+ ) -> Result<Result<(), ()>, Self::Error>;
}
Required Associated Types§
Required Methods§
Required Methods§
Object Safety§
This trait is not object safe.Implementors§
Verify algorithm that output Ok
if accepted, or Err
if rejected.
Trait definition for Collision-resistant hash function (CRHF).
+pub trait CRHF {
+CRHF in jf_crhf - Rust pub trait CRHF {
type Input;
- type Output: Clone + PartialEq + Eq + Hash + Debug + CanonicalSerialize + CanonicalDeserialize;
- type Error: Error;
+ type Output: Clone + PartialEq + Eq + Hash + Debug + CanonicalSerialize + CanonicalDeserialize;
+ type Error: Error;
// Required method
- fn evaluate<T: Borrow<Self::Input>>(
+ fn evaluate<T: Borrow<Self::Input>>(
input: T,
- ) -> Result<Self::Output, Self::Error>;
+ ) -> Result<Self::Output, Self::Error>;
}
Expand description
A trait for CRHF
(based on ark-primitives’ definition, but self-declared for minimal
dependency and easier future upgradability.)
Required Associated Types§
Required Methods§
Required Methods§
Object Safety§
This trait is not object safe.Implementors§
evaluate inputs and return hash output
+Implements the ElGamal encryption scheme.
+Implements the ElGamal encryption scheme.
pub struct Ciphertext<P>where
+Ciphertext in jf_elgamal - Rust Struct jf_elgamal::Ciphertext
source · pub struct Ciphertext<P>where
P: Config,{ /* private fields */ }
Expand description
Public encryption cipher text
Implementations§
source§impl<P> Ciphertext<P>where
- P: Config,
sourcepub fn to_scalars(&self) -> Vec<P::BaseField>
Flatten out the ciphertext into a vector of scalars
-sourcepub fn from_scalars(scalars: &[P::BaseField]) -> Result<Self, ParameterError>
Reconstruct the ciphertext from a list of scalars.
+ P: Config,sourcepub fn to_scalars(&self) -> Vec<P::BaseField>
Flatten out the ciphertext into a vector of scalars
+sourcepub fn from_scalars(scalars: &[P::BaseField]) -> Result<Self, ParameterError>
Reconstruct the ciphertext from a list of scalars.
Trait Implementations§
source§impl<P> CanonicalDeserialize for Ciphertext<P>where
- P: Config,
source§fn deserialize_with_mode<R: Read>(
+ P: Config,
source§fn deserialize_with_mode<R: Read>(
reader: R,
compress: Compress,
validate: Validate,
-) -> Result<Self, SerializationError>
The general deserialize method that takes in customization flags.§fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where
- R: Read,
§fn deserialize_compressed_unchecked<R>(
+) -> Result<Self, SerializationError>
The general deserialize method that takes in customization flags.§fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where
+ R: Read,
§fn deserialize_compressed_unchecked<R>(
reader: R,
-) -> Result<Self, SerializationError>where
- R: Read,
§fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where
- R: Read,
§fn deserialize_uncompressed_unchecked<R>(
+) -> Result<Self, SerializationError>where
+ R: Read,
§fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where
+ R: Read,
§fn deserialize_uncompressed_unchecked<R>(
reader: R,
-) -> Result<Self, SerializationError>where
- R: Read,
source§impl<P> CanonicalSerialize for Ciphertext<P>where
- P: Config,
source§impl<P> CanonicalSerialize for Ciphertext<P>where
+ P: Config,
source§fn serialize_with_mode<W: Write>(
&self,
writer: W,
compress: Compress,
-) -> Result<(), SerializationError>
The general serialize method that takes in customization flags.source§fn serialized_size(&self, compress: Compress) -> usize
§fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where
- W: Write,
§fn compressed_size(&self) -> usize
§fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where
- W: Write,
§fn uncompressed_size(&self) -> usize
source§impl<P> Clone for Ciphertext<P>where
- P: Config,
source§impl<P> Debug for Ciphertext<P>where
- P: Config,
source§impl<P> Hash for Ciphertext<P>where
- P: Config,
source§impl<P> PartialEq for Ciphertext<P>where
- P: Config,
source§fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used
-by ==
.1.0.0 · source§fn ne(&self, other: &Rhs) -> bool
This method tests for !=
. The default implementation is almost always
+) -> Result<(), SerializationError>The general serialize method that takes in customization flags.source§fn serialized_size(&self, compress: Compress) -> usize
§fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where
+ W: Write,
§fn compressed_size(&self) -> usize
§fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where
+ W: Write,
§fn uncompressed_size(&self) -> usize
source§impl<P> Clone for Ciphertext<P>where
+ P: Config,
source§impl<P> Debug for Ciphertext<P>where
+ P: Config,
source§impl<P> Hash for Ciphertext<P>where
+ P: Config,
source§impl<P> PartialEq for Ciphertext<P>where
+ P: Config,
source§impl<P> Valid for Ciphertext<P>where
- P: Config,
source§impl<P> Eq for Ciphertext<P>where
- P: Config,
Auto Trait Implementations§
§impl<P> Freeze for Ciphertext<P>where
- <P as CurveConfig>::BaseField: Freeze,
§impl<P> RefUnwindSafe for Ciphertext<P>where
- <P as CurveConfig>::BaseField: RefUnwindSafe,
§impl<P> Send for Ciphertext<P>
§impl<P> Sync for Ciphertext<P>
§impl<P> Unpin for Ciphertext<P>where
- <P as CurveConfig>::BaseField: Unpin,
§impl<P> UnwindSafe for Ciphertext<P>where
- <P as CurveConfig>::BaseField: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
- T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<T> CanonicalSerializeHashExt for Twhere
- T: CanonicalSerialize,
§fn hash<H>(&self) -> GenericArray<u8, <H as OutputSizeUser>::OutputSize>where
+ P: Config,
source§fn check(&self) -> Result<(), SerializationError>
source§fn batch_check<'a>(
+ batch: impl Iterator<Item = &'a Self> + Send,
+) -> Result<(), SerializationError>where
+ Self: 'a,
source§impl<P> Eq for Ciphertext<P>where
+ P: Config,
Auto Trait Implementations§
§impl<P> Freeze for Ciphertext<P>where
+ <P as CurveConfig>::BaseField: Freeze,
§impl<P> RefUnwindSafe for Ciphertext<P>where
+ <P as CurveConfig>::BaseField: RefUnwindSafe,
§impl<P> Send for Ciphertext<P>
§impl<P> Sync for Ciphertext<P>
§impl<P> Unpin for Ciphertext<P>where
+ <P as CurveConfig>::BaseField: Unpin,
§impl<P> UnwindSafe for Ciphertext<P>where
+ <P as CurveConfig>::BaseField: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
+ T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<T> CanonicalSerializeHashExt for Twhere
+ T: CanonicalSerialize,
§impl<T> Downcast for Twhere
- T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
-then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
-further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
-generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
+) -> GenericArray<u8, <H as OutputSizeUser>::OutputSize>where
+ H: Digest,source§impl<T> CloneToUninit for Twhere
+ T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit
)§impl<T> Downcast for Twhere
+ T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
+then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
+further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
+generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
§fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moresource§impl<T, U> Into<U> for Twhere
- U: From<T>,
source§fn into(self) -> U
Calls U::from(self)
.
+ T: Clone,source§fn __clone_box(&self, _: Private) -> *mut ()
§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moresource§impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
source§impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
-otherwise. Read more§impl<T> Pointable for T
§impl<T> Pointable for T
\ No newline at end of file
diff --git a/jf_elgamal/struct.EncKey.html b/jf_elgamal/struct.EncKey.html
index 7410d55cd..bde736a61 100644
--- a/jf_elgamal/struct.EncKey.html
+++ b/jf_elgamal/struct.EncKey.html
@@ -1,11 +1,11 @@
-EncKey in jf_elgamal - Rust Struct jf_elgamal::EncKey
source · pub struct EncKey<P>where
+EncKey in jf_elgamal - Rust Struct jf_elgamal::EncKey
source · pub struct EncKey<P>where
P: Config,{ /* private fields */ }
Expand description
Encryption key for encryption scheme
Implementations§
source§impl<F, P> EncKey<P>where
F: RescueParameter,
P: Config<BaseField = F>,
sourcepub fn deterministic_encrypt(
&self,
r: P::ScalarField,
- msg: &[F],
+ msg: &[F],
) -> Ciphertext<P>
Public key encryption function with pre-sampled randomness
r
- randomness
@@ -14,84 +14,85 @@
Trait Implementations§
source§impl<P> CanonicalDeserialize for EncKey<P>where
- P: Config,
source§fn deserialize_with_mode<R: Read>(
+ P: Config,
source§fn deserialize_with_mode<R: Read>(
reader: R,
compress: Compress,
validate: Validate,
-) -> Result<Self, SerializationError>
The general deserialize method that takes in customization flags.§fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where
- R: Read,
§fn deserialize_compressed_unchecked<R>(
+) -> Result<Self, SerializationError>
The general deserialize method that takes in customization flags.§fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where
+ R: Read,
§fn deserialize_compressed_unchecked<R>(
reader: R,
-) -> Result<Self, SerializationError>where
- R: Read,
§fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where
- R: Read,
§fn deserialize_uncompressed_unchecked<R>(
+) -> Result<Self, SerializationError>where
+ R: Read,
§fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where
+ R: Read,
§fn deserialize_uncompressed_unchecked<R>(
reader: R,
-) -> Result<Self, SerializationError>where
- R: Read,
source§impl<P> CanonicalSerialize for EncKey<P>where
+ P: Config,
source§fn serialize_with_mode<W: Write>(
&self,
writer: W,
compress: Compress,
-) -> Result<(), SerializationError>
The general serialize method that takes in customization flags.source§fn serialized_size(&self, compress: Compress) -> usize
§fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where
- W: Write,
§fn compressed_size(&self) -> usize
§fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where
- W: Write,
§fn uncompressed_size(&self) -> usize
source§impl<P: Config> PartialEq for EncKey<P>
source§fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used
-by ==
.1.0.0 · source§fn ne(&self, other: &Rhs) -> bool
This method tests for !=
. The default implementation is almost always
+) -> Result<(), SerializationError>The general serialize method that takes in customization flags.source§fn serialized_size(&self, compress: Compress) -> usize
§fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where
+ W: Write,
§fn compressed_size(&self) -> usize
§fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where
+ W: Write,
§fn uncompressed_size(&self) -> usize
source§impl<P: Config> PartialEq for EncKey<P>
source§impl<P: Config> UniformRand for EncKey<P>
Sample a random public key with unknown associated secret key
-source§impl<P> Valid for EncKey<P>where
- P: Config,
source§fn check(&self) -> Result<(), SerializationError>
source§fn batch_check<'a>(
- batch: impl Iterator<Item = &'a Self> + Send,
-) -> Result<(), SerializationError>where
+source§impl<P> Eq for EncKey<P>where
- P: Config,
Auto Trait Implementations§
§impl<P> Freeze for EncKey<P>where
- <P as CurveConfig>::BaseField: Freeze,
§impl<P> RefUnwindSafe for EncKey<P>where
- <P as CurveConfig>::BaseField: RefUnwindSafe,
§impl<P> Send for EncKey<P>
§impl<P> Sync for EncKey<P>
§impl<P> Unpin for EncKey<P>where
- <P as CurveConfig>::BaseField: Unpin,
§impl<P> UnwindSafe for EncKey<P>where
- <P as CurveConfig>::BaseField: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
- T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<T> CanonicalSerializeHashExt for Twhere
- T: CanonicalSerialize,
source§impl<P> Eq for EncKey<P>where
+ P: Config,
Auto Trait Implementations§
§impl<P> Freeze for EncKey<P>where
+ <P as CurveConfig>::BaseField: Freeze,
§impl<P> RefUnwindSafe for EncKey<P>where
+ <P as CurveConfig>::BaseField: RefUnwindSafe,
§impl<P> Send for EncKey<P>
§impl<P> Sync for EncKey<P>
§impl<P> Unpin for EncKey<P>where
+ <P as CurveConfig>::BaseField: Unpin,
§impl<P> UnwindSafe for EncKey<P>where
+ <P as CurveConfig>::BaseField: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
+ T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<T> CanonicalSerializeHashExt for Twhere
+ T: CanonicalSerialize,
§impl<T> Downcast for Twhere
- T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
-then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
-further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
-generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
+) -> GenericArray<u8, <H as OutputSizeUser>::OutputSize>where
+ H: Digest,source§impl<T> CloneToUninit for Twhere
+ T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit
)§impl<T> Downcast for Twhere
+ T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
+then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
+further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
+generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
§fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moresource§impl<T, U> Into<U> for Twhere
- U: From<T>,
source§fn into(self) -> U
Calls U::from(self)
.
+ T: Clone,source§fn __clone_box(&self, _: Private) -> *mut ()
§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moresource§impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
source§impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
-otherwise. Read more§impl<T> Pointable for T
§impl<T> Pointable for T
\ No newline at end of file
diff --git a/jf_elgamal/struct.KeyPair.html b/jf_elgamal/struct.KeyPair.html
index 19151254a..d57e9642a 100644
--- a/jf_elgamal/struct.KeyPair.html
+++ b/jf_elgamal/struct.KeyPair.html
@@ -1,79 +1,80 @@
-KeyPair in jf_elgamal - Rust Struct jf_elgamal::KeyPair
source · pub struct KeyPair<P>where
+KeyPair in jf_elgamal - Rust Struct jf_elgamal::KeyPair
source · pub struct KeyPair<P>where
P: Config,{ /* private fields */ }
Expand description
KeyPair structure for encryption scheme
Implementations§
source§impl<P> KeyPair<P>where
- P: Config,
sourcepub fn generate<R: CryptoRng + RngCore>(rng: &mut R) -> KeyPair<P>
Key generation algorithm for public key encryption scheme
+ P: Config,source§impl<F, P> KeyPair<P>where
F: RescueParameter,
- P: Config<BaseField = F>,
sourcepub fn decrypt(&self, ctext: &Ciphertext<P>) -> Vec<F>
Decryption function
+ P: Config<BaseField = F>,sourcepub fn decrypt(&self, ctext: &Ciphertext<P>) -> Vec<F>
Decryption function
Trait Implementations§
source§impl<P> CanonicalDeserialize for KeyPair<P>where
- P: Config,
source§fn deserialize_with_mode<R: Read>(
+ P: Config,
source§fn deserialize_with_mode<R: Read>(
reader: R,
compress: Compress,
validate: Validate,
-) -> Result<Self, SerializationError>
The general deserialize method that takes in customization flags.§fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where
- R: Read,
§fn deserialize_compressed_unchecked<R>(
+) -> Result<Self, SerializationError>
The general deserialize method that takes in customization flags.§fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where
+ R: Read,
§fn deserialize_compressed_unchecked<R>(
reader: R,
-) -> Result<Self, SerializationError>where
- R: Read,
§fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where
- R: Read,
§fn deserialize_uncompressed_unchecked<R>(
+) -> Result<Self, SerializationError>where
+ R: Read,
§fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where
+ R: Read,
§fn deserialize_uncompressed_unchecked<R>(
reader: R,
-) -> Result<Self, SerializationError>where
- R: Read,
source§impl<P> CanonicalSerialize for KeyPair<P>where
+ P: Config,
source§fn serialize_with_mode<W: Write>(
&self,
writer: W,
compress: Compress,
-) -> Result<(), SerializationError>
The general serialize method that takes in customization flags.source§fn serialized_size(&self, compress: Compress) -> usize
§fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where
- W: Write,
§fn compressed_size(&self) -> usize
§fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where
- W: Write,
§fn uncompressed_size(&self) -> usize
source§impl<P> PartialEq for KeyPair<P>where
- P: Config,
source§fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used
-by ==
.1.0.0 · source§fn ne(&self, other: &Rhs) -> bool
This method tests for !=
. The default implementation is almost always
+) -> Result<(), SerializationError>The general serialize method that takes in customization flags.source§fn serialized_size(&self, compress: Compress) -> usize
§fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where
+ W: Write,
§fn compressed_size(&self) -> usize
§fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where
+ W: Write,
§fn uncompressed_size(&self) -> usize
Auto Trait Implementations§
§impl<P> Freeze for KeyPair<P>
§impl<P> RefUnwindSafe for KeyPair<P>where
- <P as CurveConfig>::ScalarField: RefUnwindSafe,
- <P as CurveConfig>::BaseField: RefUnwindSafe,
§impl<P> Send for KeyPair<P>
§impl<P> Sync for KeyPair<P>
§impl<P> Unpin for KeyPair<P>
§impl<P> UnwindSafe for KeyPair<P>where
- <P as CurveConfig>::ScalarField: UnwindSafe,
- <P as CurveConfig>::BaseField: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
- T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<T> CanonicalSerializeHashExt for Twhere
- T: CanonicalSerialize,
Auto Trait Implementations§
§impl<P> Freeze for KeyPair<P>
§impl<P> RefUnwindSafe for KeyPair<P>where
+ <P as CurveConfig>::ScalarField: RefUnwindSafe,
+ <P as CurveConfig>::BaseField: RefUnwindSafe,
§impl<P> Send for KeyPair<P>
§impl<P> Sync for KeyPair<P>
§impl<P> Unpin for KeyPair<P>
§impl<P> UnwindSafe for KeyPair<P>where
+ <P as CurveConfig>::ScalarField: UnwindSafe,
+ <P as CurveConfig>::BaseField: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
+ T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<T> CanonicalSerializeHashExt for Twhere
+ T: CanonicalSerialize,
§impl<T> Downcast for Twhere
- T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
-then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
-further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
-generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
+) -> GenericArray<u8, <H as OutputSizeUser>::OutputSize>where
+ H: Digest,source§impl<T> CloneToUninit for Twhere
+ T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit
)§impl<T> Downcast for Twhere
+ T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
+then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
+further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
+generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
§fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
source§impl<T, U> Into<U> for Twhere
- U: From<T>,
source§fn into(self) -> U
Calls U::from(self)
.
+ T: Clone,source§fn __clone_box(&self, _: Private) -> *mut ()
source§impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
source§impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
-otherwise. Read more§impl<T> Pointable for T
§impl<T> Pointable for T
\ No newline at end of file
diff --git a/jf_elgamal/struct.ParameterError.html b/jf_elgamal/struct.ParameterError.html
index c0aa04f5c..516838dc4 100644
--- a/jf_elgamal/struct.ParameterError.html
+++ b/jf_elgamal/struct.ParameterError.html
@@ -1,28 +1,28 @@
-ParameterError in jf_elgamal - Rust Struct jf_elgamal::ParameterError
source · pub struct ParameterError(/* private fields */);
Expand description
Parameter error: {0}
-Trait Implementations§
source§impl Debug for ParameterError
Auto Trait Implementations§
§impl Freeze for ParameterError
§impl RefUnwindSafe for ParameterError
§impl Send for ParameterError
§impl Sync for ParameterError
§impl Unpin for ParameterError
§impl UnwindSafe for ParameterError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
- T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<T> Downcast for Twhere
- T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
-then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
-further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
-generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
+ParameterError in jf_elgamal - Rust Struct jf_elgamal::ParameterError
source · pub struct ParameterError(/* private fields */);
Expand description
Parameter error: {0}
+Trait Implementations§
source§impl Debug for ParameterError
Auto Trait Implementations§
§impl Freeze for ParameterError
§impl RefUnwindSafe for ParameterError
§impl Send for ParameterError
§impl Sync for ParameterError
§impl Unpin for ParameterError
§impl UnwindSafe for ParameterError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
+ T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<T> Downcast for Twhere
+ T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
+then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
+further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
+generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
source§impl<T, U> Into<U> for Twhere
- U: From<T>,
source§impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
source§impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
-otherwise. Read more§impl<T> Pointable for T
§impl<T> Pointable for T
\ No newline at end of file
diff --git a/jf_merkle_tree/all.html b/jf_merkle_tree/all.html
index e4158310c..6ee00dca6 100644
--- a/jf_merkle_tree/all.html
+++ b/jf_merkle_tree/all.html
@@ -1 +1 @@
-List of all items in this crate List of all items
Structs
- append_only::MerkleTree
- examples::Interval
- hasher::HasherDigestAlgorithm
- hasher::HasherNode
- light_weight::LightWeightMerkleTree
- namespaced_merkle_tree::NMT
- prelude::MerkleProof
- prelude::RescueHash
- prelude::Sha3Digest
- prelude::Sha3Node
- universal_merkle_tree::UniversalMerkleTree
Enums
Traits
- AppendableMerkleTreeScheme
- DigestAlgorithm
- Element
- ForgetableMerkleTreeScheme
- ForgetableUniversalMerkleTreeScheme
- Index
- MerkleCommitment
- MerkleTreeScheme
- NodeValue
- PersistentUniversalMerkleTreeScheme
- ToTraversalPath
- UniversalMerkleTreeScheme
- hasher::HasherDigest
- namespaced_merkle_tree::BindNamespace
- namespaced_merkle_tree::Namespace
- namespaced_merkle_tree::NamespaceProof
- namespaced_merkle_tree::Namespaced
- namespaced_merkle_tree::NamespacedMerkleTreeScheme
Macros
- impl_forgetable_merkle_tree_scheme
- impl_merkle_tree_scheme
- impl_to_traversal_path_biguint
- impl_to_traversal_path_primitives
- prelude::impl_to_traversal_path_biguint
- prelude::impl_to_traversal_path_primitives
Type Aliases
\ No newline at end of file
+List of all items in this crate List of all items
Structs
- append_only::MerkleTree
- examples::Interval
- hasher::HasherDigestAlgorithm
- hasher::HasherNode
- light_weight::LightWeightMerkleTree
- namespaced_merkle_tree::NMT
- prelude::MerkleProof
- prelude::RescueHash
- prelude::Sha3Digest
- prelude::Sha3Node
- universal_merkle_tree::UniversalMerkleTree
Enums
Traits
- AppendableMerkleTreeScheme
- DigestAlgorithm
- Element
- ForgetableMerkleTreeScheme
- ForgetableUniversalMerkleTreeScheme
- Index
- MerkleCommitment
- MerkleTreeScheme
- NodeValue
- PersistentUniversalMerkleTreeScheme
- ToTraversalPath
- UniversalMerkleTreeScheme
- hasher::HasherDigest
- namespaced_merkle_tree::BindNamespace
- namespaced_merkle_tree::Namespace
- namespaced_merkle_tree::NamespaceProof
- namespaced_merkle_tree::Namespaced
- namespaced_merkle_tree::NamespacedMerkleTreeScheme
Macros
- impl_forgetable_merkle_tree_scheme
- impl_merkle_tree_scheme
- impl_to_traversal_path_biguint
- impl_to_traversal_path_primitives
- prelude::impl_to_traversal_path_biguint
- prelude::impl_to_traversal_path_primitives
Type Aliases
\ No newline at end of file
diff --git a/jf_merkle_tree/append_only/index.html b/jf_merkle_tree/append_only/index.html
index 514def6f8..e1184d406 100644
--- a/jf_merkle_tree/append_only/index.html
+++ b/jf_merkle_tree/append_only/index.html
@@ -1,2 +1,2 @@
-jf_merkle_tree::append_only - Rust Module jf_merkle_tree::append_only
source · Expand description
Implementation of a typical append only merkle tree
+jf_merkle_tree::append_only - Rust Module jf_merkle_tree::append_only
source · Expand description
Implementation of a typical append only merkle tree
Structs§
- A standard append only Merkle tree implementation
\ No newline at end of file
diff --git a/jf_merkle_tree/append_only/struct.MerkleTree.html b/jf_merkle_tree/append_only/struct.MerkleTree.html
index 542ab4407..7c1cc3c0d 100644
--- a/jf_merkle_tree/append_only/struct.MerkleTree.html
+++ b/jf_merkle_tree/append_only/struct.MerkleTree.html
@@ -1,159 +1,160 @@
-MerkleTree in jf_merkle_tree::append_only - Rust Struct jf_merkle_tree::append_only::MerkleTree
source · pub struct MerkleTree<E, H, I, const ARITY: usize, T>where
+MerkleTree in jf_merkle_tree::append_only - Rust Struct jf_merkle_tree::append_only::MerkleTree
source · pub struct MerkleTree<E, H, I, const ARITY: usize, T>{ /* private fields */ }
Expand description
A standard append only Merkle tree implementation
-Implementations§
source§impl<E, H, I, const ARITY: usize, T> MerkleTree<E, H, I, ARITY, T>where
+
Implementations§
source§impl<E, H, I, const ARITY: usize, T> MerkleTree<E, H, I, ARITY, T>
source§impl<E, H, const ARITY: usize, T> MerkleTree<E, H, u64, ARITY, T>
sourcepub fn from_elems(
- height: Option<usize>,
- elems: impl IntoIterator<Item = impl Borrow<E>>,
-) -> Result<Self, MerkleTreeError>
Construct a new Merkle tree with given height from a data slice
+ height: Option<usize>,
+ elems: impl IntoIterator<Item = impl Borrow<E>>,
+) -> Result<Self, MerkleTreeError>Construct a new Merkle tree with given height from a data slice
height
- height of the Merkle tree, if None
, it will calculate the
minimum height that could hold all elements.
elems
- an iterator to all elements
returns
- A constructed Merkle tree, or Err()
if errors
-Trait Implementations§
source§impl<E, H, const ARITY: usize, T> AppendableMerkleTreeScheme for MerkleTree<E, H, u64, ARITY, T>where
+
Trait Implementations§
source§impl<E, H, const ARITY: usize, T> AppendableMerkleTreeScheme for MerkleTree<E, H, u64, ARITY, T>
source§fn push(
&mut self,
- elem: impl Borrow<Self::Element>,
-) -> Result<(), MerkleTreeError>
Insert a new value at the leftmost available slot Read moresource§fn extend(
+ elem: impl Borrow<Self::Element>,
+) -> Result<(), MerkleTreeError>
Insert a new value at the leftmost available slot Read moresource§fn extend(
&mut self,
- elems: impl IntoIterator<Item = impl Borrow<Self::Element>>,
-) -> Result<(), MerkleTreeError>
Insert a list of new values at the leftmost available slots Read moresource§impl<E, H, I, const ARITY: usize, T> Clone for MerkleTree<E, H, I, ARITY, T>
source§fn clone(&self) -> MerkleTree<E, H, I, ARITY, T>
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read moresource§impl<E, H, I, const ARITY: usize, T> Debug for MerkleTree<E, H, I, ARITY, T>
source§impl<'de, E, H, I, const ARITY: usize, T> Deserialize<'de> for MerkleTree<E, H, I, ARITY, T>where
+ elems: impl IntoIterator<Item = impl Borrow<Self::Element>>,
+) -> Result<(), MerkleTreeError>Insert a list of new values at the leftmost available slots Read more
source§impl<E, H, I, const ARITY: usize, T> Clone for MerkleTree<E, H, I, ARITY, T>
source§fn clone(&self) -> MerkleTree<E, H, I, ARITY, T>
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read moresource§impl<E, H, I, const ARITY: usize, T> Debug for MerkleTree<E, H, I, ARITY, T>
source§impl<'de, E, H, I, const ARITY: usize, T> Deserialize<'de> for MerkleTree<E, H, I, ARITY, T>where
E: Element + CanonicalSerialize + CanonicalDeserialize,
H: DigestAlgorithm<E, I, T>,
I: Index + CanonicalSerialize + CanonicalDeserialize,
- T: NodeValue,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl<E, H, I, const ARITY: usize, T> ForgetableMerkleTreeScheme for MerkleTree<E, H, I, ARITY, T>where
+ T: NodeValue,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl<E, H, I, const ARITY: usize, T> ForgetableMerkleTreeScheme for MerkleTree<E, H, I, ARITY, T>
source§fn from_commitment(com: impl Borrow<Self::Commitment>) -> Self
Rebuild a merkle tree from a commitment.
+ T: NodeValue,source§fn from_commitment(com: impl Borrow<Self::Commitment>) -> Self
Rebuild a merkle tree from a commitment.
Return a tree which is entirely forgotten.source§fn forget(
&mut self,
- pos: impl Borrow<Self::Index>,
-) -> LookupResult<Self::Element, Self::MembershipProof, ()>
Trim the leaf at position i
from memory, if present.
+ pos: impl Borrow<Self::Index>,
+) -> LookupResult<Self::Element, Self::MembershipProof, ()>Trim the leaf at position i
from memory, if present.
Should not trim if position i
is the last inserted leaf position.
Return is identical to result if get_leaf(pos)
were called before this
call.source§fn remember(
&mut self,
- pos: impl Borrow<Self::Index>,
- element: impl Borrow<Self::Element>,
- proof: impl Borrow<Self::MembershipProof>,
-) -> Result<(), MerkleTreeError>
“Re-insert” a leaf into the tree using its proof.
+ pos: impl Borrow<Self::Index>,
+ element: impl Borrow<Self::Element>,
+ proof: impl Borrow<Self::MembershipProof>,
+) -> Result<(), MerkleTreeError>“Re-insert” a leaf into the tree using its proof.
Returns Ok(()) if insertion is successful, or Err(err) if the
-proof disagrees with the merkle treesource§impl<E, H, I, const ARITY: usize, T> Hash for MerkleTree<E, H, I, ARITY, T>
source§impl<'a, E, H, I, const ARITY: usize, T> IntoIterator for &'a MerkleTree<E, H, I, ARITY, T>where
+proof disagrees with the merkle tree
source§impl<E, H, I, const ARITY: usize, T> Hash for MerkleTree<E, H, I, ARITY, T>
source§impl<'a, E, H, I, const ARITY: usize, T> IntoIterator for &'a MerkleTree<E, H, I, ARITY, T>
source§impl<E, H, I, const ARITY: usize, T> IntoIterator for MerkleTree<E, H, I, ARITY, T>where
+ T: NodeValue,
source§impl<E, H, I, const ARITY: usize, T> IntoIterator for MerkleTree<E, H, I, ARITY, T>
source§impl<E, H, I, const ARITY: usize, T> MerkleTreeScheme for MerkleTree<E, H, I, ARITY, T>where
+ T: NodeValue,
source§impl<E, H, I, const ARITY: usize, T> MerkleTreeScheme for MerkleTree<E, H, I, ARITY, T>
§type MembershipProof = MerkleProof<E, I, T, ARITY>
Merkle proof§type BatchMembershipProof = ()
Batch proof§type Commitment = MerkleTreeCommitment<T>
Merkle tree commitmentsource§fn num_leaves(&self) -> u64
Return the current number of leavessource§fn commitment(&self) -> Self::Commitment
Return a merkle commitment§type MembershipProof = MerkleProof<E, I, T, ARITY>
Merkle proof§type BatchMembershipProof = ()
Batch proof§type Commitment = MerkleTreeCommitment<T>
Merkle tree commitmentsource§fn num_leaves(&self) -> u64
Return the current number of leavessource§fn commitment(&self) -> Self::Commitment
Return a merkle commitmentsource§fn lookup(
&self,
- pos: impl Borrow<Self::Index>,
-) -> LookupResult<&Self::Element, Self::MembershipProof, ()>
Returns the leaf value given a position Read moresource§impl<E, H, I, const ARITY: usize, T> PartialEq for MerkleTree<E, H, I, ARITY, T>
source§fn eq(&self, other: &MerkleTree<E, H, I, ARITY, T>) -> bool
This method tests for self
and other
values to be equal, and is used
-by ==
.source§impl<E, H, I, const ARITY: usize, T> Serialize for MerkleTree<E, H, I, ARITY, T>where
+ pos: impl Borrow<Self::Index>,
+) -> LookupResult<&Self::Element, Self::MembershipProof, ()>Returns the leaf value given a position Read more
source§impl<E, H, I, const ARITY: usize, T> PartialEq for MerkleTree<E, H, I, ARITY, T>
source§fn eq(&self, other: &MerkleTree<E, H, I, ARITY, T>) -> bool
This method tests for self
and other
values to be equal, and is used
+by ==
.source§impl<E, H, I, const ARITY: usize, T> Serialize for MerkleTree<E, H, I, ARITY, T>where
E: Element + CanonicalSerialize + CanonicalDeserialize,
H: DigestAlgorithm<E, I, T>,
I: Index + CanonicalSerialize + CanonicalDeserialize,
- T: NodeValue,
source§impl<E, H, I, const ARITY: usize, T> Eq for MerkleTree<E, H, I, ARITY, T>
source§impl<E, H, I, const ARITY: usize, T> StructuralPartialEq for MerkleTree<E, H, I, ARITY, T>where
+ T: NodeValue,
source§impl<E, H, I, const ARITY: usize, T> Eq for MerkleTree<E, H, I, ARITY, T>
source§impl<E, H, I, const ARITY: usize, T> StructuralPartialEq for MerkleTree<E, H, I, ARITY, T>
Auto Trait Implementations§
§impl<E, H, I, const ARITY: usize, T> Freeze for MerkleTree<E, H, I, ARITY, T>
§impl<E, H, I, const ARITY: usize, T> RefUnwindSafe for MerkleTree<E, H, I, ARITY, T>
§impl<E, H, I, const ARITY: usize, T> Send for MerkleTree<E, H, I, ARITY, T>
§impl<E, H, I, const ARITY: usize, T> Sync for MerkleTree<E, H, I, ARITY, T>
§impl<E, H, I, const ARITY: usize, T> Unpin for MerkleTree<E, H, I, ARITY, T>where
- H: Unpin,
§impl<E, H, I, const ARITY: usize, T> UnwindSafe for MerkleTree<E, H, I, ARITY, T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
- T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<T> Downcast for Twhere
- T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
-then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
-further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
-generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
+ T: NodeValue,Auto Trait Implementations§
§impl<E, H, I, const ARITY: usize, T> Freeze for MerkleTree<E, H, I, ARITY, T>
§impl<E, H, I, const ARITY: usize, T> RefUnwindSafe for MerkleTree<E, H, I, ARITY, T>
§impl<E, H, I, const ARITY: usize, T> Send for MerkleTree<E, H, I, ARITY, T>
§impl<E, H, I, const ARITY: usize, T> Sync for MerkleTree<E, H, I, ARITY, T>
§impl<E, H, I, const ARITY: usize, T> Unpin for MerkleTree<E, H, I, ARITY, T>where
+ H: Unpin,
§impl<E, H, I, const ARITY: usize, T> UnwindSafe for MerkleTree<E, H, I, ARITY, T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
+ T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moresource§impl<T> CloneToUninit for Twhere
+ T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit
)§impl<T> Downcast for Twhere
+ T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
+then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
+further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
+generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
§fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moresource§impl<T, U> Into<U> for Twhere
- U: From<T>,
source§fn into(self) -> U
Calls U::from(self)
.
+ T: Clone,source§fn __clone_box(&self, _: Private) -> *mut ()
§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moresource§impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
source§impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
-otherwise. Read more§impl<T> Pointable for T
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
source§impl<T> Element for T
\ No newline at end of file
+otherwise. Read more§impl<T> Pointable for T
source§impl<T> DeserializeOwned for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> Element for T
\ No newline at end of file
diff --git a/jf_merkle_tree/enum.LookupResult.html b/jf_merkle_tree/enum.LookupResult.html
index 2387eae62..cbf50aef7 100644
--- a/jf_merkle_tree/enum.LookupResult.html
+++ b/jf_merkle_tree/enum.LookupResult.html
@@ -1,4 +1,4 @@
-LookupResult in jf_merkle_tree - Rust Enum jf_merkle_tree::LookupResult
source · pub enum LookupResult<F, P, N> {
+LookupResult in jf_merkle_tree - Rust Enum jf_merkle_tree::LookupResult
source · pub enum LookupResult<F, P, N> {
Ok(F, P),
NotInMemory,
NotFound(N),
@@ -9,62 +9,64 @@
§NotInMemory
The index is valid but we do not have the leaf in memory
§NotFound(N)
The index is outside the occupied range in the tree, and a
non-membership proof
-
Implementations§
source§impl<F, P, N> LookupResult<F, P, N>
sourcepub fn expect_ok(self) -> Result<(F, P), MerkleTreeError>
Assert the lookup result is Ok. Return a tuple of element and membership
+
Implementations§
source§impl<F, P, N> LookupResult<F, P, N>
sourcepub fn expect_ok(self) -> Result<(F, P), MerkleTreeError>
Assert the lookup result is Ok. Return a tuple of element and membership
proof.
-sourcepub fn expect_not_found(self) -> Result<N, MerkleTreeError>
Assert the lookup result is NotFound. Return a non-membership proof.
-sourcepub fn expect_not_in_memory(self) -> Result<(), MerkleTreeError>
Assert the lookup result is NotInMemory.
-Trait Implementations§
source§impl<F: Clone, P: Clone, N: Clone> Clone for LookupResult<F, P, N>
source§fn clone(&self) -> LookupResult<F, P, N>
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read moresource§impl<F: PartialEq, P: PartialEq, N: PartialEq> PartialEq for LookupResult<F, P, N>
source§fn eq(&self, other: &LookupResult<F, P, N>) -> bool
This method tests for self
and other
values to be equal, and is used
-by ==
.source§impl<F: Copy, P: Copy, N: Copy> Copy for LookupResult<F, P, N>
source§impl<F: Eq, P: Eq, N: Eq> Eq for LookupResult<F, P, N>
source§impl<F, P, N> StructuralPartialEq for LookupResult<F, P, N>
Auto Trait Implementations§
§impl<F, P, N> Freeze for LookupResult<F, P, N>
§impl<F, P, N> RefUnwindSafe for LookupResult<F, P, N>
§impl<F, P, N> Send for LookupResult<F, P, N>
§impl<F, P, N> Sync for LookupResult<F, P, N>
§impl<F, P, N> Unpin for LookupResult<F, P, N>
§impl<F, P, N> UnwindSafe for LookupResult<F, P, N>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
- T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<T> Downcast for Twhere
- T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
-then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
-further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
-generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
+sourcepub fn expect_not_found(self) -> Result<N, MerkleTreeError>
Assert the lookup result is NotFound. Return a non-membership proof.
+sourcepub fn expect_not_in_memory(self) -> Result<(), MerkleTreeError>
Assert the lookup result is NotInMemory.
+Trait Implementations§
source§impl<F: Clone, P: Clone, N: Clone> Clone for LookupResult<F, P, N>
source§fn clone(&self) -> LookupResult<F, P, N>
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read moresource§impl<F: PartialEq, P: PartialEq, N: PartialEq> PartialEq for LookupResult<F, P, N>
source§fn eq(&self, other: &LookupResult<F, P, N>) -> bool
This method tests for self
and other
values to be equal, and is used
+by ==
.source§impl<F: Copy, P: Copy, N: Copy> Copy for LookupResult<F, P, N>
source§impl<F: Eq, P: Eq, N: Eq> Eq for LookupResult<F, P, N>
source§impl<F, P, N> StructuralPartialEq for LookupResult<F, P, N>
Auto Trait Implementations§
§impl<F, P, N> Freeze for LookupResult<F, P, N>
§impl<F, P, N> RefUnwindSafe for LookupResult<F, P, N>
§impl<F, P, N> Send for LookupResult<F, P, N>
§impl<F, P, N> Sync for LookupResult<F, P, N>
§impl<F, P, N> Unpin for LookupResult<F, P, N>
§impl<F, P, N> UnwindSafe for LookupResult<F, P, N>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
+ T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moresource§impl<T> CloneToUninit for Twhere
+ T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
+ T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit
)§impl<T> Downcast for Twhere
+ T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
+then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
+further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
+generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
§fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moresource§impl<T, U> Into<U> for Twhere
- U: From<T>,
source§fn into(self) -> U
Calls U::from(self)
.
+ T: Clone,source§fn __clone_box(&self, _: Private) -> *mut ()
§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moresource§impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
source§impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
-otherwise. Read more§impl<T> Pointable for T
§impl<T> Pointable for T
source§impl<T> Element for T
\ No newline at end of file
+ T: Clone + Eq + PartialEq + Hash,
\ No newline at end of file
diff --git a/jf_merkle_tree/errors/enum.MerkleTreeError.html b/jf_merkle_tree/errors/enum.MerkleTreeError.html
index 44be4027d..e921c92b6 100644
--- a/jf_merkle_tree/errors/enum.MerkleTreeError.html
+++ b/jf_merkle_tree/errors/enum.MerkleTreeError.html
@@ -1,52 +1,52 @@
-MerkleTreeError in jf_merkle_tree::errors - Rust Enum jf_merkle_tree::errors::MerkleTreeError
source · pub enum MerkleTreeError {
- ParametersError(String),
+MerkleTreeError in jf_merkle_tree::errors - Rust Enum jf_merkle_tree::errors::MerkleTreeError
source · pub enum MerkleTreeError {
+ ParametersError(String),
NotFound,
ExistingLeaf,
ForgottenLeaf,
ExceedCapacity,
- DigestError(String),
- InconsistentStructureError(String),
+ DigestError(String),
+ InconsistentStructureError(String),
}
Expand description
Error type for Merkle tree
-Variants§
§ParametersError(String)
Parameters error, {0}
+Variants§
§ParametersError(String)
Parameters error, {0}
§NotFound
Queried leaf isn’t in this Merkle tree
§ExistingLeaf
Queried leaf is already occupied.
§ForgottenLeaf
Queried leaf is forgotten.
§ExceedCapacity
Merkle tree is already full.
-§DigestError(String)
Digest error, {0}
-§InconsistentStructureError(String)
Inconsistent Structure error, {0}
-Trait Implementations§
source§impl Debug for MerkleTreeError
source§impl Display for MerkleTreeError
source§impl Error for MerkleTreeError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()source§impl From<RescueError> for MerkleTreeError
source§fn from(err: RescueError) -> Self
Converts to this type from the input type.source§impl PartialEq for MerkleTreeError
source§fn eq(&self, other: &MerkleTreeError) -> bool
This method tests for self
and other
values to be equal, and is used
-by ==
.source§impl Eq for MerkleTreeError
source§impl StructuralPartialEq for MerkleTreeError
Auto Trait Implementations§
§impl Freeze for MerkleTreeError
§impl RefUnwindSafe for MerkleTreeError
§impl Send for MerkleTreeError
§impl Sync for MerkleTreeError
§impl Unpin for MerkleTreeError
§impl UnwindSafe for MerkleTreeError
Blanket Implementations§
§impl<T> AsErrorSource for Twhere
- T: Error + 'static,
Trait Implementations§
source§impl Debug for MerkleTreeError
source§impl Display for MerkleTreeError
source§impl Error for MerkleTreeError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()source§impl From<RescueError> for MerkleTreeError
source§fn from(err: RescueError) -> Self
Converts to this type from the input type.source§impl PartialEq for MerkleTreeError
source§fn eq(&self, other: &MerkleTreeError) -> bool
This method tests for self
and other
values to be equal, and is used
+by ==
.source§impl Eq for MerkleTreeError
source§impl StructuralPartialEq for MerkleTreeError
Auto Trait Implementations§
§impl Freeze for MerkleTreeError
§impl RefUnwindSafe for MerkleTreeError
§impl Send for MerkleTreeError
§impl Sync for MerkleTreeError
§impl Unpin for MerkleTreeError
§impl UnwindSafe for MerkleTreeError
Blanket Implementations§
§impl<T> AsErrorSource for Twhere
+ T: Error + 'static,
§fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
-receivers.source§impl<T> BorrowMut<T> for Twhere
- T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<T> Downcast for Twhere
- T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
-then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
-further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
-generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
+receivers.source§impl<T> BorrowMut<T> for Twhere
+ T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<T> Downcast for Twhere
+ T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
+then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
+further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
+generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
§fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moresource§impl<T, U> Into<U> for Twhere
- U: From<T>,
source§fn into(self) -> U
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moresource§impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
source§impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
-otherwise. Read more§impl<T> Pointable for T
§impl<T> Pointable for T
\ No newline at end of file
diff --git a/jf_merkle_tree/errors/index.html b/jf_merkle_tree/errors/index.html
index edee0521d..cb58f812c 100644
--- a/jf_merkle_tree/errors/index.html
+++ b/jf_merkle_tree/errors/index.html
@@ -1,2 +1,2 @@
-jf_merkle_tree::errors - Rust Module jf_merkle_tree::errors
source · Expand description
Error types
+jf_merkle_tree::errors - Rust Module jf_merkle_tree::errors
source · Expand description
Error types
Enums§
- Error type for Merkle tree
\ No newline at end of file
diff --git a/jf_merkle_tree/examples/index.html b/jf_merkle_tree/examples/index.html
index 515a1e1fa..677de5466 100644
--- a/jf_merkle_tree/examples/index.html
+++ b/jf_merkle_tree/examples/index.html
@@ -1,4 +1,4 @@
-jf_merkle_tree::examples - Rust Module jf_merkle_tree::examples
source · Expand description
Provides sample instantiations of merkle tree.
+
jf_merkle_tree::examples - Rust Module jf_merkle_tree::examples
source · Expand description
Provides sample instantiations of merkle tree.
E.g. Sparse merkle tree with BigUInt index.
Structs§
- Element type for interval merkle tree
Type Aliases§
- Interval merkle tree instantiation for interval merkle tree using Rescue
hash function.
\ No newline at end of file
diff --git a/jf_merkle_tree/examples/struct.Interval.html b/jf_merkle_tree/examples/struct.Interval.html
index be11d3b39..1063409a8 100644
--- a/jf_merkle_tree/examples/struct.Interval.html
+++ b/jf_merkle_tree/examples/struct.Interval.html
@@ -1,42 +1,44 @@
-Interval in jf_merkle_tree::examples - Rust Struct jf_merkle_tree::examples::Interval
source · pub struct Interval<F: Field>(pub F, pub F);
Expand description
Element type for interval merkle tree
-Tuple Fields§
§0: F
§1: F
Trait Implementations§
source§impl<F: RescueParameter> DigestAlgorithm<Interval<F>, u64, F> for RescueHash<F>
source§fn digest_leaf(pos: &u64, elem: &Interval<F>) -> Result<F, MerkleTreeError>
Digest an indexed elementsource§impl<F: PartialEq + Field> PartialEq for Interval<F>
source§impl<F: Copy + Field> Copy for Interval<F>
source§impl<F: Eq + Field> Eq for Interval<F>
source§impl<F: Field> StructuralPartialEq for Interval<F>
Auto Trait Implementations§
§impl<F> Freeze for Interval<F>where
- F: Freeze,
§impl<F> RefUnwindSafe for Interval<F>where
- F: RefUnwindSafe,
§impl<F> Send for Interval<F>
§impl<F> Sync for Interval<F>
§impl<F> Unpin for Interval<F>where
- F: Unpin,
§impl<F> UnwindSafe for Interval<F>where
- F: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
- T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<T> Downcast for Twhere
- T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
-then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
-further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
-generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
+Interval in jf_merkle_tree::examples - Rust Struct jf_merkle_tree::examples::Interval
source · pub struct Interval<F: Field>(pub F, pub F);
Expand description
Element type for interval merkle tree
+Tuple Fields§
§0: F
§1: F
Trait Implementations§
source§impl<F: RescueParameter> DigestAlgorithm<Interval<F>, u64, F> for RescueHash<F>
source§fn digest_leaf(pos: &u64, elem: &Interval<F>) -> Result<F, MerkleTreeError>
Digest an indexed elementsource§impl<F: PartialEq + Field> PartialEq for Interval<F>
source§impl<F: Copy + Field> Copy for Interval<F>
source§impl<F: Eq + Field> Eq for Interval<F>
source§impl<F: Field> StructuralPartialEq for Interval<F>
Auto Trait Implementations§
§impl<F> Freeze for Interval<F>where
+ F: Freeze,
§impl<F> RefUnwindSafe for Interval<F>where
+ F: RefUnwindSafe,
§impl<F> Send for Interval<F>
§impl<F> Sync for Interval<F>
§impl<F> Unpin for Interval<F>where
+ F: Unpin,
§impl<F> UnwindSafe for Interval<F>where
+ F: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
+ T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moresource§impl<T> CloneToUninit for Twhere
+ T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
+ T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit
)§impl<T> Downcast for Twhere
+ T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
+then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
+further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
+generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
§fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moresource§impl<T, U> Into<U> for Twhere
- U: From<T>,
source§fn into(self) -> U
Calls U::from(self)
.
+ T: Clone,source§fn __clone_box(&self, _: Private) -> *mut ()
§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moresource§impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
source§impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
-otherwise. Read more§impl<T> Pointable for T
§impl<T> Pointable for T
source§impl<T> Element for T
\ No newline at end of file
+ T: Clone + Eq + PartialEq + Hash,
\ No newline at end of file
diff --git a/jf_merkle_tree/examples/type.IntervalMerkleTree.html b/jf_merkle_tree/examples/type.IntervalMerkleTree.html
index bfe7c8208..71c5dc86e 100644
--- a/jf_merkle_tree/examples/type.IntervalMerkleTree.html
+++ b/jf_merkle_tree/examples/type.IntervalMerkleTree.html
@@ -1,3 +1,3 @@
-IntervalMerkleTree in jf_merkle_tree::examples - Rust Type Alias jf_merkle_tree::examples::IntervalMerkleTree
source · pub type IntervalMerkleTree<F> = MerkleTree<Interval<F>, RescueHash<F>, u64, 3, F>;
Expand description
Interval merkle tree instantiation for interval merkle tree using Rescue
+
IntervalMerkleTree in jf_merkle_tree::examples - Rust Type Alias jf_merkle_tree::examples::IntervalMerkleTree
source · pub type IntervalMerkleTree<F> = MerkleTree<Interval<F>, RescueHash<F>, u64, 3, F>;
Expand description
Interval merkle tree instantiation for interval merkle tree using Rescue
hash function.
Aliased Type§
struct IntervalMerkleTree<F> { /* private fields */ }
\ No newline at end of file
diff --git a/jf_merkle_tree/hasher/index.html b/jf_merkle_tree/hasher/index.html
index 4ec7e787c..98f776ca3 100644
--- a/jf_merkle_tree/hasher/index.html
+++ b/jf_merkle_tree/hasher/index.html
@@ -1,4 +1,4 @@
-jf_merkle_tree::hasher - Rust Module jf_merkle_tree::hasher
source · Expand description
A convenience wrapper HasherMerkleTree
to instantiate MerkleTree
for any RustCrypto-compatible hash function.
+jf_merkle_tree::hasher - Rust Module jf_merkle_tree::hasher
source · Expand description
A convenience wrapper HasherMerkleTree
to instantiate MerkleTree
for any RustCrypto-compatible hash function.
use jf_merkle_tree::{hasher::HasherMerkleTree, AppendableMerkleTreeScheme, MerkleCommitment, MerkleTreeScheme};
use sha2::Sha256;
diff --git a/jf_merkle_tree/hasher/struct.HasherDigestAlgorithm.html b/jf_merkle_tree/hasher/struct.HasherDigestAlgorithm.html
index 9fb6ce2a3..bd9c3b2c6 100644
--- a/jf_merkle_tree/hasher/struct.HasherDigestAlgorithm.html
+++ b/jf_merkle_tree/hasher/struct.HasherDigestAlgorithm.html
@@ -1,30 +1,30 @@
-HasherDigestAlgorithm in jf_merkle_tree::hasher - Rust Struct jf_merkle_tree::hasher::HasherDigestAlgorithm
source · pub struct HasherDigestAlgorithm;
Expand description
A struct that impls DigestAlgorithm
for use with MerkleTree
.
+HasherDigestAlgorithm in jf_merkle_tree::hasher - Rust Struct jf_merkle_tree::hasher::HasherDigestAlgorithm
source · pub struct HasherDigestAlgorithm;
Expand description
A struct that impls DigestAlgorithm
for use with MerkleTree
.
Trait Implementations§
source§impl<E, I, H> DigestAlgorithm<E, I, HasherNode<H>> for HasherDigestAlgorithm
source§fn digest(data: &[HasherNode<H>]) -> Result<HasherNode<H>, MerkleTreeError>
Digest a list of valuessource§fn digest_leaf(pos: &I, elem: &E) -> Result<HasherNode<H>, MerkleTreeError>
Digest an indexed elementAuto Trait Implementations§
§impl Freeze for HasherDigestAlgorithm
§impl RefUnwindSafe for HasherDigestAlgorithm
§impl Send for HasherDigestAlgorithm
§impl Sync for HasherDigestAlgorithm
§impl Unpin for HasherDigestAlgorithm
§impl UnwindSafe for HasherDigestAlgorithm
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
- T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<T> Downcast for Twhere
- T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
-then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
-further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
-generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
+ H: HasherDigest,source§fn digest(data: &[HasherNode<H>]) -> Result<HasherNode<H>, MerkleTreeError>
Digest a list of valuessource§fn digest_leaf(pos: &I, elem: &E) -> Result<HasherNode<H>, MerkleTreeError>
Digest an indexed elementAuto Trait Implementations§
§impl Freeze for HasherDigestAlgorithm
§impl RefUnwindSafe for HasherDigestAlgorithm
§impl Send for HasherDigestAlgorithm
§impl Sync for HasherDigestAlgorithm
§impl Unpin for HasherDigestAlgorithm
§impl UnwindSafe for HasherDigestAlgorithm
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
+ T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<T> Downcast for Twhere
+ T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
+then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
+further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
+generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
source§impl<T, U> Into<U> for Twhere
- U: From<T>,
source§impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
source§impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
-otherwise. Read more§impl<T> Pointable for T
§impl<T> Pointable for T
\ No newline at end of file
diff --git a/jf_merkle_tree/hasher/struct.HasherNode.html b/jf_merkle_tree/hasher/struct.HasherNode.html
index ddaabc538..9508f9824 100644
--- a/jf_merkle_tree/hasher/struct.HasherNode.html
+++ b/jf_merkle_tree/hasher/struct.HasherNode.html
@@ -1,111 +1,113 @@
-HasherNode in jf_merkle_tree::hasher - Rust Struct jf_merkle_tree::hasher::HasherNode
source · pub struct HasherNode<H>(/* private fields */)
+HasherNode in jf_merkle_tree::hasher - Rust Struct jf_merkle_tree::hasher::HasherNode
source · pub struct HasherNode<H>(/* private fields */)
where
H: Digest;
Expand description
Newtype wrapper for hash output that impls NodeValue
.
-Trait Implementations§
source§impl<H> AsRef<GenericArray<u8, <H as OutputSizeUser>::OutputSize>> for HasherNode<H>where
+
Trait Implementations§
source§impl<H> AsRef<GenericArray<u8, <H as OutputSizeUser>::OutputSize>> for HasherNode<H>where
H: Digest,
Allow access to the underlying [Output
]
-source§impl<H> CanonicalDeserialize for HasherNode<H>where
- H: Digest,
source§fn deserialize_with_mode<R: Read>(
+
source§impl<H> CanonicalDeserialize for HasherNode<H>where
+ H: Digest,
source§fn deserialize_with_mode<R: Read>(
reader: R,
_compress: Compress,
_validate: Validate,
-) -> Result<Self, SerializationError>
The general deserialize method that takes in customization flags.§fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where
- R: Read,
§fn deserialize_compressed_unchecked<R>(
+) -> Result<Self, SerializationError>
The general deserialize method that takes in customization flags.§fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where
+ R: Read,
§fn deserialize_compressed_unchecked<R>(
reader: R,
-) -> Result<Self, SerializationError>where
- R: Read,
§fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where
- R: Read,
§fn deserialize_uncompressed_unchecked<R>(
+) -> Result<Self, SerializationError>where
+ R: Read,
§fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where
+ R: Read,
§fn deserialize_uncompressed_unchecked<R>(
reader: R,
-) -> Result<Self, SerializationError>where
- R: Read,
source§impl<H> CanonicalSerialize for HasherNode<H>where
- H: Digest,
source§impl<H> CanonicalSerialize for HasherNode<H>where
+ H: Digest,
source§fn serialize_with_mode<W: Write>(
&self,
writer: W,
_compress: Compress,
-) -> Result<(), SerializationError>
The general serialize method that takes in customization flags.source§fn serialized_size(&self, _compress: Compress) -> usize
§fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where
- W: Write,
§fn compressed_size(&self) -> usize
§fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where
- W: Write,
§fn uncompressed_size(&self) -> usize
source§impl<H> Clone for HasherNode<H>where
- H: Digest,
source§impl<H> Debug for HasherNode<H>where
- H: Digest,
source§impl<H> Default for HasherNode<H>where
- H: Digest,
source§impl<'de, H> Deserialize<'de> for HasherNode<H>where
- H: Digest,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl<E, I, H> DigestAlgorithm<E, I, HasherNode<H>> for HasherDigestAlgorithmwhere
+) -> Result<(), SerializationError>The general serialize method that takes in customization flags.source§fn serialized_size(&self, _compress: Compress) -> usize
§fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where
+ W: Write,
§fn compressed_size(&self) -> usize
§fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where
+ W: Write,
§fn uncompressed_size(&self) -> usize
source§impl<H> Clone for HasherNode<H>where
+ H: Digest,
source§impl<H> Debug for HasherNode<H>where
+ H: Digest,
source§impl<H> Default for HasherNode<H>where
+ H: Digest,
source§impl<'de, H> Deserialize<'de> for HasherNode<H>where
+ H: Digest,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl<E, I, H> DigestAlgorithm<E, I, HasherNode<H>> for HasherDigestAlgorithm
source§fn digest(data: &[HasherNode<H>]) -> Result<HasherNode<H>, MerkleTreeError>
Digest a list of valuessource§fn digest_leaf(pos: &I, elem: &E) -> Result<HasherNode<H>, MerkleTreeError>
Digest an indexed elementsource§impl<H> Display for HasherNode<H>where
- H: Digest,
source§impl<H> From<&HasherNode<H>> for TaggedBase64where
- H: Digest,
source§fn from(x: &HasherNode<H>) -> Self
Converts to this type from the input type.source§impl<H> From<GenericArray<u8, <H as OutputSizeUser>::OutputSize>> for HasherNode<H>where
+ H: HasherDigest,
source§fn digest(data: &[HasherNode<H>]) -> Result<HasherNode<H>, MerkleTreeError>
Digest a list of valuessource§fn digest_leaf(pos: &I, elem: &E) -> Result<HasherNode<H>, MerkleTreeError>
Digest an indexed elementsource§impl<H> Display for HasherNode<H>where
+ H: Digest,
source§impl<H> From<&HasherNode<H>> for TaggedBase64where
+ H: Digest,
source§fn from(x: &HasherNode<H>) -> Self
Converts to this type from the input type.source§impl<H> From<GenericArray<u8, <H as OutputSizeUser>::OutputSize>> for HasherNode<H>where
H: Digest,
Allow creation from [Output
]
-source§impl<H> From<HasherNode<H>> for TaggedBase64where
- H: Digest,
source§fn from(x: HasherNode<H>) -> Self
Converts to this type from the input type.source§impl<H> FromStr for HasherNode<H>where
- H: Digest,
source§impl<H> Hash for HasherNode<H>where
- H: Digest,
source§impl<H> Ord for HasherNode<H>where
- H: Digest,
source§impl<H> PartialEq for HasherNode<H>where
- H: Digest,
source§impl<H> PartialOrd for HasherNode<H>where
- H: Digest,
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
-operator. Read moresource§impl<H> Serialize for HasherNode<H>where
- H: Digest,
source§impl<H> TryFrom<&TaggedBase64> for HasherNode<H>where
- H: Digest,
source§impl<H> TryFrom<TaggedBase64> for HasherNode<H>where
- H: Digest,
source§impl<H> Valid for HasherNode<H>where
- H: Digest,
source§impl<H> Copy for HasherNode<H>where
+source§impl<H> From<HasherNode<H>> for TaggedBase64where
+ H: Digest,
source§fn from(x: HasherNode<H>) -> Self
Converts to this type from the input type.source§impl<H> FromStr for HasherNode<H>where
+ H: Digest,
source§impl<H> Hash for HasherNode<H>where
+ H: Digest,
source§impl<H> Ord for HasherNode<H>where
+ H: Digest,
source§impl<H> PartialEq for HasherNode<H>where
+ H: Digest,
source§impl<H> PartialOrd for HasherNode<H>where
+ H: Digest,
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
+operator. Read moresource§impl<H> Serialize for HasherNode<H>where
+ H: Digest,
source§impl<H> TryFrom<&TaggedBase64> for HasherNode<H>where
+ H: Digest,
source§impl<H> TryFrom<TaggedBase64> for HasherNode<H>where
+ H: Digest,
source§impl<H> Valid for HasherNode<H>where
+ H: Digest,
source§impl<H> Copy for HasherNode<H>
source§impl<H> Eq for HasherNode<H>where
- H: Digest,
Auto Trait Implementations§
§impl<H> Freeze for HasherNode<H>
§impl<H> RefUnwindSafe for HasherNode<H>where
- <<H as OutputSizeUser>::OutputSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
§impl<H> Send for HasherNode<H>
§impl<H> Sync for HasherNode<H>
§impl<H> Unpin for HasherNode<H>
§impl<H> UnwindSafe for HasherNode<H>where
- <<H as OutputSizeUser>::OutputSize as ArrayLength<u8>>::ArrayType: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
- T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<T> CanonicalSerializeHashExt for Twhere
- T: CanonicalSerialize,
§fn hash<H>(&self) -> GenericArray<u8, <H as OutputSizeUser>::OutputSize>
source§impl<H> Eq for HasherNode<H>where
+ H: Digest,
Auto Trait Implementations§
§impl<H> Freeze for HasherNode<H>
§impl<H> RefUnwindSafe for HasherNode<H>where
+ <<H as OutputSizeUser>::OutputSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
§impl<H> Send for HasherNode<H>
§impl<H> Sync for HasherNode<H>
§impl<H> Unpin for HasherNode<H>
§impl<H> UnwindSafe for HasherNode<H>where
+ <<H as OutputSizeUser>::OutputSize as ArrayLength<u8>>::ArrayType: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
+ T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<T> CanonicalSerializeHashExt for Twhere
+ T: CanonicalSerialize,
§impl<T> Downcast for Twhere
- T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
-then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
-further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
-generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
+) -> GenericArray<u8, <H as OutputSizeUser>::OutputSize>where
+ H: Digest,source§impl<T> CloneToUninit for Twhere
+ T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
+ T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit
)§impl<T> Downcast for Twhere
+ T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
+then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
+further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
+generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
§fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moresource§impl<T, U> Into<U> for Twhere
- U: From<T>,
source§fn into(self) -> U
Calls U::from(self)
.
+ T: Clone,source§fn __clone_box(&self, _: Private) -> *mut ()
§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moresource§impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
source§impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
-otherwise. Read more§impl<T> Pointable for T
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
source§impl<T> Element for T
source§impl<T> Index for T
source§impl<T> NodeValue for T
\ No newline at end of file
+otherwise. Read more§impl<T> Pointable for T
source§impl<T> DeserializeOwned for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> Element for T
source§impl<T> Index for T
source§impl<T> NodeValue for T
\ No newline at end of file
diff --git a/jf_merkle_tree/hasher/trait.HasherDigest.html b/jf_merkle_tree/hasher/trait.HasherDigest.html
index 2bc951970..6265f97b7 100644
--- a/jf_merkle_tree/hasher/trait.HasherDigest.html
+++ b/jf_merkle_tree/hasher/trait.HasherDigest.html
@@ -1,6 +1,6 @@
-HasherDigest in jf_merkle_tree::hasher - Rust Trait jf_merkle_tree::hasher::HasherDigest
source · pub trait HasherDigest: Digest<OutputSize = Self::Foo> + Write + Send + Sync {
- type Foo: ArrayLength<u8, ArrayType = Self::Bar>;
- type Bar: Copy;
+HasherDigest in jf_merkle_tree::hasher - Rust Trait jf_merkle_tree::hasher::HasherDigest
source · pub trait HasherDigest: Digest<OutputSize = Self::Foo> + Write + Send + Sync {
+ type Foo: ArrayLength<u8, ArrayType = Self::Bar>;
+ type Bar: Copy;
}
Expand description
Convenience trait and blanket impl for downstream trait bounds.
Useful for downstream code that’s generic offer [Digest
] hasher H
.
§Example
@@ -23,7 +23,7 @@ §Example
let my_data = [1, 2, 3, 4, 5, 6, 7, 8, 9];
let mt = HasherMerkleTree::<H, usize>::from_elems(None, &my_data).unwrap();
}
-Note that the complex trait bound for Copy
is necessary:
+Note that the complex trait bound for Copy
is necessary:
-Required Associated Types§
Object Safety§
This trait is not object safe.Implementors§
\ No newline at end of file
+Required Associated Types§
Object Safety§
This trait is not object safe.Implementors§
\ No newline at end of file
diff --git a/jf_merkle_tree/hasher/type.GenericHasherMerkleTree.html b/jf_merkle_tree/hasher/type.GenericHasherMerkleTree.html
index 6160c0297..641d13f3a 100644
--- a/jf_merkle_tree/hasher/type.GenericHasherMerkleTree.html
+++ b/jf_merkle_tree/hasher/type.GenericHasherMerkleTree.html
@@ -1,9 +1,9 @@
-GenericHasherMerkleTree in jf_merkle_tree::hasher - Rust Type Alias jf_merkle_tree::hasher::GenericHasherMerkleTree
source · pub type GenericHasherMerkleTree<H, E, I, const ARITY: usize> = MerkleTree<E, HasherDigestAlgorithm, I, ARITY, HasherNode<H>>;
Expand description
Like HasherMerkleTree
except with additional parameters.
+GenericHasherMerkleTree in jf_merkle_tree::hasher - Rust Type Alias jf_merkle_tree::hasher::GenericHasherMerkleTree
source · pub type GenericHasherMerkleTree<H, E, I, const ARITY: usize> = MerkleTree<E, HasherDigestAlgorithm, I, ARITY, HasherNode<H>>;
Expand description
Like HasherMerkleTree
except with additional parameters.
Additional parameters beyond HasherMerkleTree
:
-Aliased Type§
struct GenericHasherMerkleTree<H, E, I, const ARITY: usize> { /* private fields */ }
\ No newline at end of file
+Aliased Type§
struct GenericHasherMerkleTree<H, E, I, const ARITY: usize> { /* private fields */ }
\ No newline at end of file
diff --git a/jf_merkle_tree/hasher/type.HasherMerkleTree.html b/jf_merkle_tree/hasher/type.HasherMerkleTree.html
index 8efeb4603..e768cca8f 100644
--- a/jf_merkle_tree/hasher/type.HasherMerkleTree.html
+++ b/jf_merkle_tree/hasher/type.HasherMerkleTree.html
@@ -1,5 +1,5 @@
-HasherMerkleTree in jf_merkle_tree::hasher - Rust Type Alias jf_merkle_tree::hasher::HasherMerkleTree
source · pub type HasherMerkleTree<H, E> = GenericHasherMerkleTree<H, E, u64, 3>;
Expand description
Merkle tree generic over [Digest
] hasher H
.
-It’s a trinary tree whose nodes are indexed by u64
.
+HasherMerkleTree in jf_merkle_tree::hasher - Rust Type Alias jf_merkle_tree::hasher::HasherMerkleTree
source · pub type HasherMerkleTree<H, E> = GenericHasherMerkleTree<H, E, u64, 3>;
Expand description
Merkle tree generic over [Digest
] hasher H
.
+It’s a trinary tree whose nodes are indexed by u64
.
H
is a RustCrypto-compatible
hash function.
diff --git a/jf_merkle_tree/index.html b/jf_merkle_tree/index.html
index 4346ae633..2f96c8ba9 100644
--- a/jf_merkle_tree/index.html
+++ b/jf_merkle_tree/index.html
@@ -1,4 +1,4 @@
-jf_merkle_tree - Rust Crate jf_merkle_tree
source · Expand description
Merkle Tree traits and implementations
+jf_merkle_tree - Rust Crate jf_merkle_tree
source · Expand description
Merkle Tree traits and implementations
Re-exports§
pub use crate::errors::MerkleTreeError;
Modules§
- Implementation of a typical append only merkle tree
- Error types
- Provides sample instantiations of merkle tree.
E.g. Sparse merkle tree with BigUInt index.
- A convenience wrapper
HasherMerkleTree
to instantiate MerkleTree
for any RustCrypto-compatible hash function. - A light weight merkle tree is an append only merkle tree who only keeps its
frontier – the right-most path.
- Useful macros
- Implementation of a Namespaced Merkle Tree.
- Prelude. Also provides sample instantiations of merkle trees.
- Implementation of a typical Sparse Merkle Tree.
Macros§
- Macro for generating a forgetable merkle tree implementation
- Macro for generating a standard merkle tree implementation
- Macros for implementing ToTreversalPath for BigUint types
- Macros for implementing ToTreversalPath for primitive types
Enums§
- The result of querying at an index in the tree
diff --git a/jf_merkle_tree/light_weight/index.html b/jf_merkle_tree/light_weight/index.html
index 92092a80c..6c483fb12 100644
--- a/jf_merkle_tree/light_weight/index.html
+++ b/jf_merkle_tree/light_weight/index.html
@@ -1,3 +1,3 @@
-
jf_merkle_tree::light_weight - Rust Module jf_merkle_tree::light_weight
source · Expand description
A light weight merkle tree is an append only merkle tree who only keeps its
+
jf_merkle_tree::light_weight - Rust Module jf_merkle_tree::light_weight
source · Expand description
A light weight merkle tree is an append only merkle tree who only keeps its
frontier – the right-most path.
Structs§
- A standard append only Merkle tree implementation
\ No newline at end of file
diff --git a/jf_merkle_tree/light_weight/struct.LightWeightMerkleTree.html b/jf_merkle_tree/light_weight/struct.LightWeightMerkleTree.html
index 56502f1d9..fe03c4e64 100644
--- a/jf_merkle_tree/light_weight/struct.LightWeightMerkleTree.html
+++ b/jf_merkle_tree/light_weight/struct.LightWeightMerkleTree.html
@@ -1,159 +1,160 @@
-LightWeightMerkleTree in jf_merkle_tree::light_weight - Rust pub struct LightWeightMerkleTree<E, H, I, const ARITY: usize, T>where
+LightWeightMerkleTree in jf_merkle_tree::light_weight - Rust pub struct LightWeightMerkleTree<E, H, I, const ARITY: usize, T>{ /* private fields */ }
Expand description
A standard append only Merkle tree implementation
-Implementations§
source§impl<E, H, I, const ARITY: usize, T> LightWeightMerkleTree<E, H, I, ARITY, T>where
+
Implementations§
source§impl<E, H, I, const ARITY: usize, T> LightWeightMerkleTree<E, H, I, ARITY, T>
source§impl<E, H, const ARITY: usize, T> LightWeightMerkleTree<E, H, u64, ARITY, T>where
+ T: NodeValue,
source§impl<E, H, const ARITY: usize, T> LightWeightMerkleTree<E, H, u64, ARITY, T>
sourcepub fn from_elems(
- height: Option<usize>,
- elems: impl IntoIterator<Item = impl Borrow<E>>,
-) -> Result<Self, MerkleTreeError>
Construct a new Merkle tree with given height from a data slice
+ height: Option<usize>,
+ elems: impl IntoIterator<Item = impl Borrow<E>>,
+) -> Result<Self, MerkleTreeError>Construct a new Merkle tree with given height from a data slice
height
- height of the Merkle tree, if None
, it will calculate the
minimum height that could hold all elements.
elems
- an iterator to all elements
returns
- A constructed Merkle tree, or Err()
if errors
-Trait Implementations§
source§impl<E, H, const ARITY: usize, T> AppendableMerkleTreeScheme for LightWeightMerkleTree<E, H, u64, ARITY, T>where
+
Trait Implementations§
source§impl<E, H, const ARITY: usize, T> AppendableMerkleTreeScheme for LightWeightMerkleTree<E, H, u64, ARITY, T>
source§fn push(
&mut self,
- elem: impl Borrow<Self::Element>,
-) -> Result<(), MerkleTreeError>
Insert a new value at the leftmost available slot Read moresource§fn extend(
+ elem: impl Borrow<Self::Element>,
+) -> Result<(), MerkleTreeError>
Insert a new value at the leftmost available slot Read moresource§fn extend(
&mut self,
- elems: impl IntoIterator<Item = impl Borrow<Self::Element>>,
-) -> Result<(), MerkleTreeError>
Insert a list of new values at the leftmost available slots Read moresource§impl<E, H, I, const ARITY: usize, T> Clone for LightWeightMerkleTree<E, H, I, ARITY, T>
source§fn clone(&self) -> LightWeightMerkleTree<E, H, I, ARITY, T>
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read moresource§impl<E, H, I, const ARITY: usize, T> Debug for LightWeightMerkleTree<E, H, I, ARITY, T>
source§impl<'de, E, H, I, const ARITY: usize, T> Deserialize<'de> for LightWeightMerkleTree<E, H, I, ARITY, T>where
+ elems: impl IntoIterator<Item = impl Borrow<Self::Element>>,
+) -> Result<(), MerkleTreeError>Insert a list of new values at the leftmost available slots Read more
source§impl<E, H, I, const ARITY: usize, T> Clone for LightWeightMerkleTree<E, H, I, ARITY, T>
source§fn clone(&self) -> LightWeightMerkleTree<E, H, I, ARITY, T>
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read moresource§impl<E, H, I, const ARITY: usize, T> Debug for LightWeightMerkleTree<E, H, I, ARITY, T>
source§impl<'de, E, H, I, const ARITY: usize, T> Deserialize<'de> for LightWeightMerkleTree<E, H, I, ARITY, T>where
E: Element + CanonicalSerialize + CanonicalDeserialize,
H: DigestAlgorithm<E, I, T>,
I: Index + CanonicalSerialize + CanonicalDeserialize,
- T: NodeValue,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl<E, H, I, const ARITY: usize, T> ForgetableMerkleTreeScheme for LightWeightMerkleTree<E, H, I, ARITY, T>where
+ T: NodeValue,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl<E, H, I, const ARITY: usize, T> ForgetableMerkleTreeScheme for LightWeightMerkleTree<E, H, I, ARITY, T>
source§fn from_commitment(com: impl Borrow<Self::Commitment>) -> Self
Rebuild a merkle tree from a commitment.
+ T: NodeValue,source§fn from_commitment(com: impl Borrow<Self::Commitment>) -> Self
Rebuild a merkle tree from a commitment.
Return a tree which is entirely forgotten.source§fn forget(
&mut self,
- pos: impl Borrow<Self::Index>,
-) -> LookupResult<Self::Element, Self::MembershipProof, ()>
Trim the leaf at position i
from memory, if present.
+ pos: impl Borrow<Self::Index>,
+) -> LookupResult<Self::Element, Self::MembershipProof, ()>Trim the leaf at position i
from memory, if present.
Should not trim if position i
is the last inserted leaf position.
Return is identical to result if get_leaf(pos)
were called before this
call.source§fn remember(
&mut self,
- pos: impl Borrow<Self::Index>,
- element: impl Borrow<Self::Element>,
- proof: impl Borrow<Self::MembershipProof>,
-) -> Result<(), MerkleTreeError>
“Re-insert” a leaf into the tree using its proof.
+ pos: impl Borrow<Self::Index>,
+ element: impl Borrow<Self::Element>,
+ proof: impl Borrow<Self::MembershipProof>,
+) -> Result<(), MerkleTreeError>“Re-insert” a leaf into the tree using its proof.
Returns Ok(()) if insertion is successful, or Err(err) if the
-proof disagrees with the merkle treesource§impl<E, H, I, const ARITY: usize, T> Hash for LightWeightMerkleTree<E, H, I, ARITY, T>
source§impl<'a, E, H, I, const ARITY: usize, T> IntoIterator for &'a LightWeightMerkleTree<E, H, I, ARITY, T>where
+proof disagrees with the merkle tree
source§impl<E, H, I, const ARITY: usize, T> Hash for LightWeightMerkleTree<E, H, I, ARITY, T>
source§impl<'a, E, H, I, const ARITY: usize, T> IntoIterator for &'a LightWeightMerkleTree<E, H, I, ARITY, T>
source§impl<E, H, I, const ARITY: usize, T> IntoIterator for LightWeightMerkleTree<E, H, I, ARITY, T>where
+ T: NodeValue,
source§impl<E, H, I, const ARITY: usize, T> IntoIterator for LightWeightMerkleTree<E, H, I, ARITY, T>
source§impl<E, H, I, const ARITY: usize, T> MerkleTreeScheme for LightWeightMerkleTree<E, H, I, ARITY, T>where
+ T: NodeValue,
source§impl<E, H, I, const ARITY: usize, T> MerkleTreeScheme for LightWeightMerkleTree<E, H, I, ARITY, T>
§type MembershipProof = MerkleProof<E, I, T, ARITY>
Merkle proof§type BatchMembershipProof = ()
Batch proof§type Commitment = MerkleTreeCommitment<T>
Merkle tree commitmentsource§fn num_leaves(&self) -> u64
Return the current number of leavessource§fn commitment(&self) -> Self::Commitment
Return a merkle commitment§type MembershipProof = MerkleProof<E, I, T, ARITY>
Merkle proof§type BatchMembershipProof = ()
Batch proof§type Commitment = MerkleTreeCommitment<T>
Merkle tree commitmentsource§fn num_leaves(&self) -> u64
Return the current number of leavessource§fn commitment(&self) -> Self::Commitment
Return a merkle commitmentsource§fn lookup(
&self,
- pos: impl Borrow<Self::Index>,
-) -> LookupResult<&Self::Element, Self::MembershipProof, ()>
Returns the leaf value given a position Read moresource§impl<E, H, I, const ARITY: usize, T> PartialEq for LightWeightMerkleTree<E, H, I, ARITY, T>
source§fn eq(&self, other: &LightWeightMerkleTree<E, H, I, ARITY, T>) -> bool
This method tests for self
and other
values to be equal, and is used
-by ==
.source§impl<E, H, I, const ARITY: usize, T> Serialize for LightWeightMerkleTree<E, H, I, ARITY, T>where
+ pos: impl Borrow<Self::Index>,
+) -> LookupResult<&Self::Element, Self::MembershipProof, ()>Returns the leaf value given a position Read more
source§impl<E, H, I, const ARITY: usize, T> PartialEq for LightWeightMerkleTree<E, H, I, ARITY, T>
source§fn eq(&self, other: &LightWeightMerkleTree<E, H, I, ARITY, T>) -> bool
This method tests for self
and other
values to be equal, and is used
+by ==
.source§impl<E, H, I, const ARITY: usize, T> Serialize for LightWeightMerkleTree<E, H, I, ARITY, T>where
E: Element + CanonicalSerialize + CanonicalDeserialize,
H: DigestAlgorithm<E, I, T>,
I: Index + CanonicalSerialize + CanonicalDeserialize,
- T: NodeValue,
source§impl<E, H, I, const ARITY: usize, T> Eq for LightWeightMerkleTree<E, H, I, ARITY, T>
source§impl<E, H, I, const ARITY: usize, T> StructuralPartialEq for LightWeightMerkleTree<E, H, I, ARITY, T>where
+ T: NodeValue,
source§impl<E, H, I, const ARITY: usize, T> Eq for LightWeightMerkleTree<E, H, I, ARITY, T>
source§impl<E, H, I, const ARITY: usize, T> StructuralPartialEq for LightWeightMerkleTree<E, H, I, ARITY, T>
Auto Trait Implementations§
§impl<E, H, I, const ARITY: usize, T> Freeze for LightWeightMerkleTree<E, H, I, ARITY, T>
§impl<E, H, I, const ARITY: usize, T> RefUnwindSafe for LightWeightMerkleTree<E, H, I, ARITY, T>
§impl<E, H, I, const ARITY: usize, T> Send for LightWeightMerkleTree<E, H, I, ARITY, T>
§impl<E, H, I, const ARITY: usize, T> Sync for LightWeightMerkleTree<E, H, I, ARITY, T>
§impl<E, H, I, const ARITY: usize, T> Unpin for LightWeightMerkleTree<E, H, I, ARITY, T>where
- H: Unpin,
§impl<E, H, I, const ARITY: usize, T> UnwindSafe for LightWeightMerkleTree<E, H, I, ARITY, T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
- T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<T> Downcast for Twhere
- T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
-then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
-further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
-generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
+ T: NodeValue,Auto Trait Implementations§
§impl<E, H, I, const ARITY: usize, T> Freeze for LightWeightMerkleTree<E, H, I, ARITY, T>
§impl<E, H, I, const ARITY: usize, T> RefUnwindSafe for LightWeightMerkleTree<E, H, I, ARITY, T>
§impl<E, H, I, const ARITY: usize, T> Send for LightWeightMerkleTree<E, H, I, ARITY, T>
§impl<E, H, I, const ARITY: usize, T> Sync for LightWeightMerkleTree<E, H, I, ARITY, T>
§impl<E, H, I, const ARITY: usize, T> Unpin for LightWeightMerkleTree<E, H, I, ARITY, T>where
+ H: Unpin,
§impl<E, H, I, const ARITY: usize, T> UnwindSafe for LightWeightMerkleTree<E, H, I, ARITY, T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
+ T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moresource§impl<T> CloneToUninit for Twhere
+ T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit
)§impl<T> Downcast for Twhere
+ T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
+then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
+further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
+generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
§fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moresource§impl<T, U> Into<U> for Twhere
- U: From<T>,
source§fn into(self) -> U
Calls U::from(self)
.
+ T: Clone,source§fn __clone_box(&self, _: Private) -> *mut ()
§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moresource§impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
source§impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
-otherwise. Read more§impl<T> Pointable for T
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
source§impl<T> Element for T
\ No newline at end of file
+otherwise. Read more§impl<T> Pointable for T
source§impl<T> DeserializeOwned for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> Element for T
\ No newline at end of file
diff --git a/jf_merkle_tree/macro.impl_forgetable_merkle_tree_scheme.html b/jf_merkle_tree/macro.impl_forgetable_merkle_tree_scheme.html
index 78acca1df..9ab6f3665 100644
--- a/jf_merkle_tree/macro.impl_forgetable_merkle_tree_scheme.html
+++ b/jf_merkle_tree/macro.impl_forgetable_merkle_tree_scheme.html
@@ -1,4 +1,4 @@
-impl_forgetable_merkle_tree_scheme in jf_merkle_tree - Rust macro_rules! impl_forgetable_merkle_tree_scheme {
+impl_forgetable_merkle_tree_scheme in jf_merkle_tree - Rust macro_rules! impl_forgetable_merkle_tree_scheme {
($name: ident) => { ... };
}
Expand description
Macro for generating a forgetable merkle tree implementation
\ No newline at end of file
diff --git a/jf_merkle_tree/macro.impl_merkle_tree_scheme.html b/jf_merkle_tree/macro.impl_merkle_tree_scheme.html
index 16eaacc34..28b54dffc 100644
--- a/jf_merkle_tree/macro.impl_merkle_tree_scheme.html
+++ b/jf_merkle_tree/macro.impl_merkle_tree_scheme.html
@@ -1,4 +1,4 @@
-impl_merkle_tree_scheme in jf_merkle_tree - Rust macro_rules! impl_merkle_tree_scheme {
+impl_merkle_tree_scheme in jf_merkle_tree - Rust macro_rules! impl_merkle_tree_scheme {
($name: ident) => { ... };
}
Expand description
Macro for generating a standard merkle tree implementation
\ No newline at end of file
diff --git a/jf_merkle_tree/macro.impl_to_traversal_path_biguint.html b/jf_merkle_tree/macro.impl_to_traversal_path_biguint.html
index 136f587e8..855d89828 100644
--- a/jf_merkle_tree/macro.impl_to_traversal_path_biguint.html
+++ b/jf_merkle_tree/macro.impl_to_traversal_path_biguint.html
@@ -1,4 +1,4 @@
-impl_to_traversal_path_biguint in jf_merkle_tree - Rust macro_rules! impl_to_traversal_path_biguint {
+impl_to_traversal_path_biguint in jf_merkle_tree - Rust macro_rules! impl_to_traversal_path_biguint {
($t: ty) => { ... };
}
Expand description
Macros for implementing ToTreversalPath for BigUint types
\ No newline at end of file
diff --git a/jf_merkle_tree/macro.impl_to_traversal_path_primitives.html b/jf_merkle_tree/macro.impl_to_traversal_path_primitives.html
index 0259cc0c9..daf99d336 100644
--- a/jf_merkle_tree/macro.impl_to_traversal_path_primitives.html
+++ b/jf_merkle_tree/macro.impl_to_traversal_path_primitives.html
@@ -1,4 +1,4 @@
-impl_to_traversal_path_primitives in jf_merkle_tree - Rust macro_rules! impl_to_traversal_path_primitives {
+impl_to_traversal_path_primitives in jf_merkle_tree - Rust macro_rules! impl_to_traversal_path_primitives {
($t: ty) => { ... };
}
Expand description
Macros for implementing ToTreversalPath for primitive types
\ No newline at end of file
diff --git a/jf_merkle_tree/macros/index.html b/jf_merkle_tree/macros/index.html
index a7bbdee6b..1a6e45cf4 100644
--- a/jf_merkle_tree/macros/index.html
+++ b/jf_merkle_tree/macros/index.html
@@ -1,2 +1,2 @@
-jf_merkle_tree::macros - Rust Module jf_merkle_tree::macros
source · Expand description
Useful macros
+jf_merkle_tree::macros - Rust Module jf_merkle_tree::macros
source · Expand description
Useful macros
\ No newline at end of file
diff --git a/jf_merkle_tree/namespaced_merkle_tree/index.html b/jf_merkle_tree/namespaced_merkle_tree/index.html
index aded21b01..c25b36366 100644
--- a/jf_merkle_tree/namespaced_merkle_tree/index.html
+++ b/jf_merkle_tree/namespaced_merkle_tree/index.html
@@ -1,4 +1,4 @@
-jf_merkle_tree::namespaced_merkle_tree - Rust Module jf_merkle_tree::namespaced_merkle_tree
source · Expand description
Implementation of a Namespaced Merkle Tree.
+jf_merkle_tree::namespaced_merkle_tree - Rust Module jf_merkle_tree::namespaced_merkle_tree
source · Expand description
Implementation of a Namespaced Merkle Tree.
Structs§
- NMT
Traits§
- Trait indicating that a digest algorithm can commit to
a namespace range.
- Trait indicating that a struct can act as an orderable namespace
- Completeness proof for a namespace
- Trait indicating that a leaf has a namespace.
- Namespaced Merkle Tree where leaves are sorted by a namespace identifier.
The data structure supports namespace inclusion proofs.
\ No newline at end of file
diff --git a/jf_merkle_tree/namespaced_merkle_tree/struct.NMT.html b/jf_merkle_tree/namespaced_merkle_tree/struct.NMT.html
index b4ad9e6af..9921b5471 100644
--- a/jf_merkle_tree/namespaced_merkle_tree/struct.NMT.html
+++ b/jf_merkle_tree/namespaced_merkle_tree/struct.NMT.html
@@ -1,67 +1,67 @@
-NMT in jf_merkle_tree::namespaced_merkle_tree - Rust Struct jf_merkle_tree::namespaced_merkle_tree::NMT
source · pub struct NMT<E, H, const ARITY: usize, N, T>where
- H: DigestAlgorithm<E, u64, T> + BindNamespace<E, u64, T, N>,
+NMT in jf_merkle_tree::namespaced_merkle_tree - Rust Struct jf_merkle_tree::namespaced_merkle_tree::NMT
source · pub struct NMT<E, H, const ARITY: usize, N, T>where
+ H: DigestAlgorithm<E, u64, T> + BindNamespace<E, u64, T, N>,
E: Element + Namespaced<Namespace = N>,
T: NodeValue,
N: Namespace,{ /* private fields */ }
Expand description
NMT
-Implementations§
Implementations§
source§impl<E, H, const ARITY: usize, N, T> NMT<E, H, ARITY, N, T>where
+ H: DigestAlgorithm<E, u64, T> + BindNamespace<E, u64, T, N>,
E: Element + Namespaced<Namespace = N>,
T: NodeValue,
- N: Namespace,
sourcepub fn new(height: usize) -> Self
Initializze an empty NMT
+ N: Namespace,sourcepub fn from_elems(
- height: Option<usize>,
- elems: impl IntoIterator<Item = impl Borrow<E>>,
-) -> Result<Self, MerkleTreeError>
Construct an NMT from elements.
-source§impl<E, H, const ARITY: usize, N, T> NMT<E, H, ARITY, N, T>where
- H: DigestAlgorithm<E, u64, T> + BindNamespace<E, u64, T, N>,
+ height: Option<usize>,
+ elems: impl IntoIterator<Item = impl Borrow<E>>,
+) -> Result<Self, MerkleTreeError>Construct an NMT from elements.
+
source§impl<E, H, const ARITY: usize, N, T> NMT<E, H, ARITY, N, T>where
+ H: DigestAlgorithm<E, u64, T> + BindNamespace<E, u64, T, N>,
E: Element + Namespaced<Namespace = N>,
T: NodeValue,
- N: Namespace,
sourcepub fn leaves(&self) -> impl ExactSizeIterator<Item = &E> + '_
Helper function to return an iterator over the leaves in the tree
-Trait Implementations§
source§impl<E, H, const ARITY: usize, N, T> AppendableMerkleTreeScheme for NMT<E, H, ARITY, N, T>
sourcepub fn leaves(&self) -> impl ExactSizeIterator<Item = &E> + '_
Helper function to return an iterator over the leaves in the tree
+Trait Implementations§
source§impl<E, H, const ARITY: usize, N, T> AppendableMerkleTreeScheme for NMT<E, H, ARITY, N, T>where
+ H: DigestAlgorithm<E, u64, T> + BindNamespace<E, u64, T, N>,
E: Element + Namespaced<Namespace = N>,
T: NodeValue,
N: Namespace,
source§fn extend(
&mut self,
- elems: impl IntoIterator<Item = impl Borrow<Self::Element>>,
-) -> Result<(), MerkleTreeError>
Insert a list of new values at the leftmost available slots Read moresource§fn push(
+ elems: impl IntoIterator<Item = impl Borrow<Self::Element>>,
+) -> Result<(), MerkleTreeError>
Insert a list of new values at the leftmost available slots Read moresource§impl<E, H, const ARITY: usize, N, T> Clone for NMT<E, H, ARITY, N, T>where
- H: DigestAlgorithm<E, u64, T> + BindNamespace<E, u64, T, N> + Clone,
- E: Element + Namespaced<Namespace = N> + Clone,
- T: NodeValue + Clone,
- N: Namespace + Clone,
source§impl<E, H, const ARITY: usize, N, T> Debug for NMT<E, H, ARITY, N, T>where
- H: DigestAlgorithm<E, u64, T> + BindNamespace<E, u64, T, N> + Debug,
- E: Element + Namespaced<Namespace = N> + Debug,
- T: NodeValue + Debug,
- N: Namespace + Debug,
source§impl<'de, E, H, const ARITY: usize, N, T> Deserialize<'de> for NMT<E, H, ARITY, N, T>where
- H: DigestAlgorithm<E, u64, T> + BindNamespace<E, u64, T, N>,
+ elem: impl Borrow<Self::Element>,
+) -> Result<(), MerkleTreeError>Insert a new value at the leftmost available slot Read more
source§impl<E, H, const ARITY: usize, N, T> Clone for NMT<E, H, ARITY, N, T>where
+ H: DigestAlgorithm<E, u64, T> + BindNamespace<E, u64, T, N> + Clone,
+ E: Element + Namespaced<Namespace = N> + Clone,
+ T: NodeValue + Clone,
+ N: Namespace + Clone,
source§impl<E, H, const ARITY: usize, N, T> Debug for NMT<E, H, ARITY, N, T>where
+ H: DigestAlgorithm<E, u64, T> + BindNamespace<E, u64, T, N> + Debug,
+ E: Element + Namespaced<Namespace = N> + Debug,
+ T: NodeValue + Debug,
+ N: Namespace + Debug,
source§impl<'de, E, H, const ARITY: usize, N, T> Deserialize<'de> for NMT<E, H, ARITY, N, T>where
+ H: DigestAlgorithm<E, u64, T> + BindNamespace<E, u64, T, N>,
E: Element + Namespaced<Namespace = N> + CanonicalSerialize + CanonicalDeserialize,
T: NodeValue + CanonicalSerialize + CanonicalDeserialize,
- N: Namespace,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl<E, H, const ARITY: usize, N, T> Hash for NMT<E, H, ARITY, N, T>where
- H: DigestAlgorithm<E, u64, T> + BindNamespace<E, u64, T, N> + Hash,
- E: Element + Namespaced<Namespace = N> + Hash,
- T: NodeValue + Hash,
- N: Namespace + Hash,
source§impl<E, H, const ARITY: usize, N, T> MerkleTreeScheme for NMT<E, H, ARITY, N, T>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl<E, H, const ARITY: usize, N, T> Hash for NMT<E, H, ARITY, N, T>where
+ H: DigestAlgorithm<E, u64, T> + BindNamespace<E, u64, T, N> + Hash,
+ E: Element + Namespaced<Namespace = N> + Hash,
+ T: NodeValue + Hash,
+ N: Namespace + Hash,
source§impl<E, H, const ARITY: usize, N, T> MerkleTreeScheme for NMT<E, H, ARITY, N, T>where
+ H: DigestAlgorithm<E, u64, T> + BindNamespace<E, u64, T, N>,
E: Element + Namespaced<Namespace = N>,
T: NodeValue,
- N: Namespace,
§type MembershipProof = <MerkleTree<E, NamespacedHasher<H, E, u64, T, N>, u64, ARITY, NamespacedHash<T, N>> as MerkleTreeScheme>::MembershipProof
Merkle proof§type BatchMembershipProof = <MerkleTree<E, NamespacedHasher<H, E, u64, T, N>, u64, ARITY, NamespacedHash<T, N>> as MerkleTreeScheme>::BatchMembershipProof
Batch proof§type Commitment = <MerkleTree<E, NamespacedHasher<H, E, u64, T, N>, u64, ARITY, NamespacedHash<T, N>> as MerkleTreeScheme>::Commitment
Merkle tree commitmentsource§fn num_leaves(&self) -> u64
Return the current number of leavessource§fn commitment(&self) -> Self::Commitment
Return a merkle commitment§type MembershipProof = <MerkleTree<E, NamespacedHasher<H, E, u64, T, N>, u64, ARITY, NamespacedHash<T, N>> as MerkleTreeScheme>::MembershipProof
Merkle proof§type BatchMembershipProof = <MerkleTree<E, NamespacedHasher<H, E, u64, T, N>, u64, ARITY, NamespacedHash<T, N>> as MerkleTreeScheme>::BatchMembershipProof
Batch proof§type Commitment = <MerkleTree<E, NamespacedHasher<H, E, u64, T, N>, u64, ARITY, NamespacedHash<T, N>> as MerkleTreeScheme>::Commitment
Merkle tree commitmentsource§fn num_leaves(&self) -> u64
Return the current number of leavessource§fn commitment(&self) -> Self::Commitment
Return a merkle commitmentsource§fn lookup(
&self,
- pos: impl Borrow<Self::Index>,
-) -> LookupResult<&Self::Element, Self::MembershipProof, ()>
Returns the leaf value given a position Read moresource§fn verify(
- root: impl Borrow<Self::NodeValue>,
- pos: impl Borrow<Self::Index>,
- proof: impl Borrow<Self::MembershipProof>,
-) -> Result<Result<(), ()>, MerkleTreeError>
Verify an element is a leaf of a Merkle tree given the proof Read moresource§fn iter(
+ pos: impl Borrow<Self::Index>,
+) -> LookupResult<&Self::Element, Self::MembershipProof, ()>
Returns the leaf value given a position Read moresource§impl<E, H, const ARITY: usize, N, T> NamespacedMerkleTreeScheme for NMT<E, H, ARITY, N, T>
source§impl<E, H, const ARITY: usize, N, T> NamespacedMerkleTreeScheme for NMT<E, H, ARITY, N, T>where
+ H: DigestAlgorithm<E, u64, T> + BindNamespace<E, u64, T, N> + Clone,
E: Element + Namespaced<Namespace = N>,
T: NodeValue,
N: Namespace,
§type NamespaceId = N
Namespace type§type NamespaceProof = NaiveNamespaceProof<E, T, ARITY, N, H>
Namespace proof typesource§fn get_namespace_proof(
@@ -72,77 +72,78 @@
&self,
proof: &Self::NamespaceProof,
namespace: Self::NamespaceId,
-) -> Result<Result<(), ()>, MerkleTreeError>
Verifies the completeness proof for a given set of leaves and a
-namespace.source§impl<E, H, const ARITY: usize, N, T> PartialEq for NMT<E, H, ARITY, N, T>where
- H: DigestAlgorithm<E, u64, T> + BindNamespace<E, u64, T, N> + PartialEq,
- E: Element + Namespaced<Namespace = N> + PartialEq,
- T: NodeValue + PartialEq,
- N: Namespace + PartialEq,
source§impl<E, H, const ARITY: usize, N, T> Serialize for NMT<E, H, ARITY, N, T>where
- H: DigestAlgorithm<E, u64, T> + BindNamespace<E, u64, T, N>,
+) -> Result<Result<(), ()>, MerkleTreeError>Verifies the completeness proof for a given set of leaves and a
+namespace.
source§impl<E, H, const ARITY: usize, N, T> PartialEq for NMT<E, H, ARITY, N, T>where
+ H: DigestAlgorithm<E, u64, T> + BindNamespace<E, u64, T, N> + PartialEq,
+ E: Element + Namespaced<Namespace = N> + PartialEq,
+ T: NodeValue + PartialEq,
+ N: Namespace + PartialEq,
source§impl<E, H, const ARITY: usize, N, T> Serialize for NMT<E, H, ARITY, N, T>where
+ H: DigestAlgorithm<E, u64, T> + BindNamespace<E, u64, T, N>,
E: Element + Namespaced<Namespace = N> + CanonicalSerialize + CanonicalDeserialize,
T: NodeValue + CanonicalSerialize + CanonicalDeserialize,
- N: Namespace,
source§impl<E, H, const ARITY: usize, N, T> Eq for NMT<E, H, ARITY, N, T>where
- H: DigestAlgorithm<E, u64, T> + BindNamespace<E, u64, T, N> + Eq,
- E: Element + Namespaced<Namespace = N> + Eq,
- T: NodeValue + Eq,
- N: Namespace + Eq,
source§impl<E, H, const ARITY: usize, N, T> StructuralPartialEq for NMT<E, H, ARITY, N, T>
source§impl<E, H, const ARITY: usize, N, T> Eq for NMT<E, H, ARITY, N, T>where
+ H: DigestAlgorithm<E, u64, T> + BindNamespace<E, u64, T, N> + Eq,
+ E: Element + Namespaced<Namespace = N> + Eq,
+ T: NodeValue + Eq,
+ N: Namespace + Eq,
source§impl<E, H, const ARITY: usize, N, T> StructuralPartialEq for NMT<E, H, ARITY, N, T>where
+ H: DigestAlgorithm<E, u64, T> + BindNamespace<E, u64, T, N>,
E: Element + Namespaced<Namespace = N>,
T: NodeValue,
- N: Namespace,
Auto Trait Implementations§
§impl<E, H, const ARITY: usize, N, T> Freeze for NMT<E, H, ARITY, N, T>
§impl<E, H, const ARITY: usize, N, T> RefUnwindSafe for NMT<E, H, ARITY, N, T>
§impl<E, H, const ARITY: usize, N, T> Send for NMT<E, H, ARITY, N, T>
§impl<E, H, const ARITY: usize, N, T> Sync for NMT<E, H, ARITY, N, T>
§impl<E, H, const ARITY: usize, N, T> Unpin for NMT<E, H, ARITY, N, T>
§impl<E, H, const ARITY: usize, N, T> UnwindSafe for NMT<E, H, ARITY, N, T>where
- N: RefUnwindSafe + UnwindSafe,
- E: RefUnwindSafe + UnwindSafe,
- T: RefUnwindSafe + UnwindSafe,
- H: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
- T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<T> Downcast for Twhere
- T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
-then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
-further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
-generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
+ N: Namespace,Auto Trait Implementations§
§impl<E, H, const ARITY: usize, N, T> Freeze for NMT<E, H, ARITY, N, T>
§impl<E, H, const ARITY: usize, N, T> RefUnwindSafe for NMT<E, H, ARITY, N, T>
§impl<E, H, const ARITY: usize, N, T> Send for NMT<E, H, ARITY, N, T>
§impl<E, H, const ARITY: usize, N, T> Sync for NMT<E, H, ARITY, N, T>
§impl<E, H, const ARITY: usize, N, T> Unpin for NMT<E, H, ARITY, N, T>
§impl<E, H, const ARITY: usize, N, T> UnwindSafe for NMT<E, H, ARITY, N, T>where
+ N: RefUnwindSafe + UnwindSafe,
+ E: RefUnwindSafe + UnwindSafe,
+ T: RefUnwindSafe + UnwindSafe,
+ H: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
+ T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moresource§impl<T> CloneToUninit for Twhere
+ T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit
)§impl<T> Downcast for Twhere
+ T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
+then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
+further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
+generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
§fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moresource§impl<T, U> Into<U> for Twhere
- U: From<T>,
source§fn into(self) -> U
Calls U::from(self)
.
+ T: Clone,source§fn __clone_box(&self, _: Private) -> *mut ()
§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moresource§impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
source§impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
-otherwise. Read more§impl<T> Pointable for T
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
source§impl<T> Element for T
\ No newline at end of file
+otherwise. Read more§impl<T> Pointable for T
source§impl<T> DeserializeOwned for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> Element for T
\ No newline at end of file
diff --git a/jf_merkle_tree/namespaced_merkle_tree/trait.BindNamespace.html b/jf_merkle_tree/namespaced_merkle_tree/trait.BindNamespace.html
index 440408dde..6aefceab5 100644
--- a/jf_merkle_tree/namespaced_merkle_tree/trait.BindNamespace.html
+++ b/jf_merkle_tree/namespaced_merkle_tree/trait.BindNamespace.html
@@ -1,4 +1,4 @@
-BindNamespace in jf_merkle_tree::namespaced_merkle_tree - Rust pub trait BindNamespace<E, I, T, N>: DigestAlgorithm<E, I, T>where
+BindNamespace in jf_merkle_tree::namespaced_merkle_tree - Rust pub trait BindNamespace<E, I, T, N>: DigestAlgorithm<E, I, T>where
E: Element,
N: Namespace,
T: NodeValue,
@@ -10,7 +10,7 @@
}Expand description
Trait indicating that a digest algorithm can commit to
a namespace range.
Required Methods§
sourcefn generate_namespaced_commitment(namespaced_hash: NamespacedHash<T, N>) -> T
Generate a commitment that binds a node to a namespace range
-Object Safety§
This trait is not object safe.Implementors§
source§impl<E, I, N> BindNamespace<E, I, Sha3Node, N> for Sha3Digestwhere
+
Object Safety§
This trait is not object safe.Implementors§
source§impl<E, I, N> BindNamespace<E, I, Sha3Node, N> for Sha3Digest
\ No newline at end of file
diff --git a/jf_merkle_tree/namespaced_merkle_tree/trait.Namespace.html b/jf_merkle_tree/namespaced_merkle_tree/trait.Namespace.html
index f86457e1d..cda12213c 100644
--- a/jf_merkle_tree/namespaced_merkle_tree/trait.Namespace.html
+++ b/jf_merkle_tree/namespaced_merkle_tree/trait.Namespace.html
@@ -1,8 +1,8 @@
-Namespace in jf_merkle_tree::namespaced_merkle_tree - Rust pub trait Namespace: Debug + Clone + CanonicalDeserialize + CanonicalSerialize + Default + Copy + Hash + Ord + Serialize + DeserializeOwned {
+Namespace in jf_merkle_tree::namespaced_merkle_tree - Rust pub trait Namespace: Debug + Clone + CanonicalDeserialize + CanonicalSerialize + Default + Copy + Hash + Ord + Serialize + DeserializeOwned {
// Required methods
fn min() -> Self;
fn max() -> Self;
}
Expand description
Trait indicating that a struct can act as an orderable namespace
Required Methods§
Object Safety§
This trait is not object safe.Implementations on Foreign Types§
Implementors§
\ No newline at end of file
+
Object Safety§
This trait is not object safe.Implementations on Foreign Types§
Implementors§
\ No newline at end of file
diff --git a/jf_merkle_tree/namespaced_merkle_tree/trait.NamespaceProof.html b/jf_merkle_tree/namespaced_merkle_tree/trait.NamespaceProof.html
index 673cdfccc..0a0e205d0 100644
--- a/jf_merkle_tree/namespaced_merkle_tree/trait.NamespaceProof.html
+++ b/jf_merkle_tree/namespaced_merkle_tree/trait.NamespaceProof.html
@@ -1,23 +1,23 @@
-NamespaceProof in jf_merkle_tree::namespaced_merkle_tree - Rust pub trait NamespaceProof {
+NamespaceProof in jf_merkle_tree::namespaced_merkle_tree - Rust pub trait NamespaceProof {
type Namespace: Namespace;
type Leaf: Element + Namespaced<Namespace = Self::Namespace>;
type Node: NodeValue;
// Required methods
- fn get_namespace_leaves(&self) -> Vec<&Self::Leaf>;
+ fn get_namespace_leaves(&self) -> Vec<&Self::Leaf>;
fn verify(
&self,
root: &NamespacedHash<Self::Node, Self::Namespace>,
namespace: Self::Namespace,
- ) -> Result<Result<(), ()>, MerkleTreeError>;
+ ) -> Result<Result<(), ()>, MerkleTreeError>;
}
Expand description
Completeness proof for a namespace
Required Associated Types§
sourcetype Leaf: Element + Namespaced<Namespace = Self::Namespace>
Namespaced leaf
Required Methods§
sourcefn get_namespace_leaves(&self) -> Vec<&Self::Leaf>
Return the set of leaves associated with this Namespace proof
+Required Methods§
sourcefn get_namespace_leaves(&self) -> Vec<&Self::Leaf>
Return the set of leaves associated with this Namespace proof
\ No newline at end of file
diff --git a/jf_merkle_tree/namespaced_merkle_tree/trait.Namespaced.html b/jf_merkle_tree/namespaced_merkle_tree/trait.Namespaced.html
index 1ef0ec40f..6ca62e62f 100644
--- a/jf_merkle_tree/namespaced_merkle_tree/trait.Namespaced.html
+++ b/jf_merkle_tree/namespaced_merkle_tree/trait.Namespaced.html
@@ -1,4 +1,4 @@
-Namespaced in jf_merkle_tree::namespaced_merkle_tree - Rust pub trait Namespaced {
+Namespaced in jf_merkle_tree::namespaced_merkle_tree - Rust pub trait Namespaced {
type Namespace: Namespace;
// Required method
diff --git a/jf_merkle_tree/namespaced_merkle_tree/trait.NamespacedMerkleTreeScheme.html b/jf_merkle_tree/namespaced_merkle_tree/trait.NamespacedMerkleTreeScheme.html
index 8fafbcee3..a3b7b5568 100644
--- a/jf_merkle_tree/namespaced_merkle_tree/trait.NamespacedMerkleTreeScheme.html
+++ b/jf_merkle_tree/namespaced_merkle_tree/trait.NamespacedMerkleTreeScheme.html
@@ -1,4 +1,4 @@
-NamespacedMerkleTreeScheme in jf_merkle_tree::namespaced_merkle_tree - Rust pub trait NamespacedMerkleTreeScheme: AppendableMerkleTreeSchemewhere
+NamespacedMerkleTreeScheme in jf_merkle_tree::namespaced_merkle_tree - Rust