pub struct NoteVarBuilder<const TOKEN_ID_SET: bool, const TOKEN_AMOUNT_SET: bool, const TRAPDOOR_SET: bool, const NULLIFIER_SET: bool, const NOTE_SET: bool> { /* private fields */ }Implementations§
Source§impl NoteVarBuilder<false, false, false, false, false>
impl NoteVarBuilder<false, false, false, false, false>
pub fn new(cs: ConstraintSystemRef<CircuitField>) -> Self
Source§impl<const _1: bool, const _2: bool, const _3: bool, const _4: bool> NoteVarBuilder<false, _1, _2, _3, _4>
impl<const _1: bool, const _2: bool, const _3: bool, const _4: bool> NoteVarBuilder<false, _1, _2, _3, _4>
pub fn with_token_id( self, token_id: Result<&BackendTokenId, SynthesisError>, mode: AllocationMode, ) -> Result<NoteVarBuilder<true, _1, _2, _3, _4>, SynthesisError>
pub fn with_token_id_var( self, token_id: FpVar, ) -> NoteVarBuilder<true, _1, _2, _3, _4>
Source§impl<const _1: bool, const _2: bool, const _3: bool, const _4: bool> NoteVarBuilder<_1, false, _2, _3, _4>
impl<const _1: bool, const _2: bool, const _3: bool, const _4: bool> NoteVarBuilder<_1, false, _2, _3, _4>
pub fn with_token_amount( self, token_amount: Result<&BackendTokenAmount, SynthesisError>, mode: AllocationMode, ) -> Result<NoteVarBuilder<_1, true, _2, _3, _4>, SynthesisError>
pub fn with_token_amount_var( self, token_amount: TokenAmountVar, ) -> NoteVarBuilder<_1, true, _2, _3, _4>
Source§impl<const _1: bool, const _2: bool, const _3: bool, const _4: bool> NoteVarBuilder<_1, _2, false, _3, _4>
impl<const _1: bool, const _2: bool, const _3: bool, const _4: bool> NoteVarBuilder<_1, _2, false, _3, _4>
pub fn with_trapdoor( self, trapdoor: Result<&BackendTrapdoor, SynthesisError>, mode: AllocationMode, ) -> Result<NoteVarBuilder<_1, _2, true, _3, _4>, SynthesisError>
pub fn with_trapdoor_var( self, trapdoor: FpVar, ) -> NoteVarBuilder<_1, _2, true, _3, _4>
Source§impl<const _1: bool, const _2: bool, const _3: bool, const _4: bool> NoteVarBuilder<_1, _2, _3, false, _4>
impl<const _1: bool, const _2: bool, const _3: bool, const _4: bool> NoteVarBuilder<_1, _2, _3, false, _4>
pub fn with_nullifier( self, nullifier: Result<&BackendNullifier, SynthesisError>, mode: AllocationMode, ) -> Result<NoteVarBuilder<_1, _2, _3, true, _4>, SynthesisError>
pub fn with_nullifier_var( self, nullifier: FpVar, ) -> NoteVarBuilder<_1, _2, _3, true, _4>
Source§impl<const _1: bool, const _2: bool, const _3: bool, const _4: bool> NoteVarBuilder<_1, _2, _3, _4, false>
impl<const _1: bool, const _2: bool, const _3: bool, const _4: bool> NoteVarBuilder<_1, _2, _3, _4, false>
pub fn with_note( self, note: Result<&BackendNote, SynthesisError>, mode: AllocationMode, ) -> Result<NoteVarBuilder<_1, _2, _3, _4, true>, SynthesisError>
pub fn with_note_var(self, note: FpVar) -> NoteVarBuilder<_1, _2, _3, _4, true>
Source§impl NoteVarBuilder<true, true, true, true, true>
impl NoteVarBuilder<true, true, true, true, true>
Sourcepub fn build(self) -> Result<NoteVar, SynthesisError>
pub fn build(self) -> Result<NoteVar, SynthesisError>
Verify that note is indeed the result of hashing (token_id, token_amount, trapdoor, nullifier). If so, return NoteVar holding all components.
Trait Implementations§
Source§impl<const TOKEN_ID_SET: bool, const TOKEN_AMOUNT_SET: bool, const TRAPDOOR_SET: bool, const NULLIFIER_SET: bool, const NOTE_SET: bool> Clone for NoteVarBuilder<TOKEN_ID_SET, TOKEN_AMOUNT_SET, TRAPDOOR_SET, NULLIFIER_SET, NOTE_SET>
impl<const TOKEN_ID_SET: bool, const TOKEN_AMOUNT_SET: bool, const TRAPDOOR_SET: bool, const NULLIFIER_SET: bool, const NOTE_SET: bool> Clone for NoteVarBuilder<TOKEN_ID_SET, TOKEN_AMOUNT_SET, TRAPDOOR_SET, NULLIFIER_SET, NOTE_SET>
Source§fn clone(
&self,
) -> NoteVarBuilder<TOKEN_ID_SET, TOKEN_AMOUNT_SET, TRAPDOOR_SET, NULLIFIER_SET, NOTE_SET>
fn clone( &self, ) -> NoteVarBuilder<TOKEN_ID_SET, TOKEN_AMOUNT_SET, TRAPDOOR_SET, NULLIFIER_SET, NOTE_SET>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<const TOKEN_ID_SET: bool, const TOKEN_AMOUNT_SET: bool, const TRAPDOOR_SET: bool, const NULLIFIER_SET: bool, const NOTE_SET: bool> Freeze for NoteVarBuilder<TOKEN_ID_SET, TOKEN_AMOUNT_SET, TRAPDOOR_SET, NULLIFIER_SET, NOTE_SET>
impl<const TOKEN_ID_SET: bool, const TOKEN_AMOUNT_SET: bool, const TRAPDOOR_SET: bool, const NULLIFIER_SET: bool, const NOTE_SET: bool> !RefUnwindSafe for NoteVarBuilder<TOKEN_ID_SET, TOKEN_AMOUNT_SET, TRAPDOOR_SET, NULLIFIER_SET, NOTE_SET>
impl<const TOKEN_ID_SET: bool, const TOKEN_AMOUNT_SET: bool, const TRAPDOOR_SET: bool, const NULLIFIER_SET: bool, const NOTE_SET: bool> !Send for NoteVarBuilder<TOKEN_ID_SET, TOKEN_AMOUNT_SET, TRAPDOOR_SET, NULLIFIER_SET, NOTE_SET>
impl<const TOKEN_ID_SET: bool, const TOKEN_AMOUNT_SET: bool, const TRAPDOOR_SET: bool, const NULLIFIER_SET: bool, const NOTE_SET: bool> !Sync for NoteVarBuilder<TOKEN_ID_SET, TOKEN_AMOUNT_SET, TRAPDOOR_SET, NULLIFIER_SET, NOTE_SET>
impl<const TOKEN_ID_SET: bool, const TOKEN_AMOUNT_SET: bool, const TRAPDOOR_SET: bool, const NULLIFIER_SET: bool, const NOTE_SET: bool> Unpin for NoteVarBuilder<TOKEN_ID_SET, TOKEN_AMOUNT_SET, TRAPDOOR_SET, NULLIFIER_SET, NOTE_SET>
impl<const TOKEN_ID_SET: bool, const TOKEN_AMOUNT_SET: bool, const TRAPDOOR_SET: bool, const NULLIFIER_SET: bool, const NOTE_SET: bool> !UnwindSafe for NoteVarBuilder<TOKEN_ID_SET, TOKEN_AMOUNT_SET, TRAPDOOR_SET, NULLIFIER_SET, NOTE_SET>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more