mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-11-14 01:57:03 +00:00
Implementation of fundamental circuitry and primitive Jubjub curve arithmetic.
This commit is contained in:
21
src/circuit/mod.rs
Normal file
21
src/circuit/mod.rs
Normal file
@@ -0,0 +1,21 @@
|
||||
#[cfg(test)]
|
||||
pub mod test;
|
||||
|
||||
pub mod boolean;
|
||||
pub mod uint32;
|
||||
pub mod blake2s;
|
||||
|
||||
use bellman::SynthesisError;
|
||||
|
||||
trait Assignment<T> {
|
||||
fn get(&self) -> Result<&T, SynthesisError>;
|
||||
}
|
||||
|
||||
impl<T> Assignment<T> for Option<T> {
|
||||
fn get(&self) -> Result<&T, SynthesisError> {
|
||||
match *self {
|
||||
Some(ref v) => Ok(v),
|
||||
None => Err(SynthesisError::AssignmentMissing)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user