Struct wasm_utils::proof::ProofInputBuilder
source · [−]pub struct ProofInputBuilder {
pub recipient: Option<Vec<u8>>,
pub relayer: Option<Vec<u8>>,
pub leaves: Option<Vec<[u8; 32]>>,
pub leaf_index: Option<u64>,
pub fee: Option<u128>,
pub refund: Option<u128>,
pub pk: Option<Vec<u8>>,
pub note: Option<JsNote>,
pub refresh_commitment: Option<[u8; 32]>,
pub roots: Option<Vec<Vec<u8>>>,
}Fields
recipient: Option<Vec<u8>>relayer: Option<Vec<u8>>leaves: Option<Vec<[u8; 32]>>leaf_index: Option<u64>fee: Option<u128>refund: Option<u128>pk: Option<Vec<u8>>note: Option<JsNote>refresh_commitment: Option<[u8; 32]>required only for [anchor,]
roots: Option<Vec<Vec<u8>>>required only for [anchor,]
Implementations
sourceimpl ProofInputBuilder
impl ProofInputBuilder
pub fn build(self) -> Result<ProofInput, OpStatusCode>
sourceimpl ProofInputBuilder
impl ProofInputBuilder
pub fn new() -> Self
pub fn set_roots(&mut self, roots: Leaves) -> Result<(), JsValue>
pub fn set_refresh_commitment(
&mut self,
refresh_commitment: JsString
) -> Result<(), JsValue>
pub fn set_recipient(&mut self, recipient: JsString) -> Result<(), JsValue>
pub fn set_relayer(&mut self, relayer: JsString) -> Result<(), JsValue>
pub fn set_leaves(&mut self, leaves: Leaves) -> Result<(), JsValue>
pub fn set_leaf_index(&mut self, leaf_index: JsString) -> Result<(), JsValue>
pub fn set_fee(&mut self, fee: JsString) -> Result<(), JsValue>
pub fn set_refund(&mut self, refund: JsString) -> Result<(), JsValue>
pub fn set_pk(&mut self, pk: JsString) -> Result<(), JsValue>
pub fn set_note(&mut self, note: &JsNote) -> Result<(), JsValue>
pub fn build_js(self) -> Result<JsProofInput, JsValue>
Trait Implementations
sourceimpl Debug for ProofInputBuilder
impl Debug for ProofInputBuilder
sourceimpl Default for ProofInputBuilder
impl Default for ProofInputBuilder
sourcefn default() -> ProofInputBuilder
fn default() -> ProofInputBuilder
Returns the “default value” for a type. Read more
sourceimpl From<ProofInputBuilder> for JsValue
impl From<ProofInputBuilder> for JsValue
sourcefn from(value: ProofInputBuilder) -> Self
fn from(value: ProofInputBuilder) -> Self
Converts to this type from the input type.
sourceimpl FromWasmAbi for ProofInputBuilder
impl FromWasmAbi for ProofInputBuilder
sourceimpl IntoWasmAbi for ProofInputBuilder
impl IntoWasmAbi for ProofInputBuilder
sourceimpl OptionFromWasmAbi for ProofInputBuilder
impl OptionFromWasmAbi for ProofInputBuilder
sourceimpl OptionIntoWasmAbi for ProofInputBuilder
impl OptionIntoWasmAbi for ProofInputBuilder
sourceimpl PartialEq<ProofInputBuilder> for ProofInputBuilder
impl PartialEq<ProofInputBuilder> for ProofInputBuilder
sourcefn eq(&self, other: &ProofInputBuilder) -> bool
fn eq(&self, other: &ProofInputBuilder) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &ProofInputBuilder) -> bool
fn ne(&self, other: &ProofInputBuilder) -> bool
This method tests for !=.
sourceimpl RefFromWasmAbi for ProofInputBuilder
impl RefFromWasmAbi for ProofInputBuilder
type Anchor = Ref<'static, ProofInputBuilder>
type Anchor = Ref<'static, ProofInputBuilder>
The type that holds the reference to Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous. Read more
sourceunsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor
Recover a Self::Anchor from Self::Abi. Read more
sourceimpl RefMutFromWasmAbi for ProofInputBuilder
impl RefMutFromWasmAbi for ProofInputBuilder
type Anchor = RefMut<'static, ProofInputBuilder>
type Anchor = RefMut<'static, ProofInputBuilder>
Same as RefFromWasmAbi::Anchor
sourceunsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
Same as RefFromWasmAbi::ref_from_abi
sourceimpl WasmDescribe for ProofInputBuilder
impl WasmDescribe for ProofInputBuilder
impl Eq for ProofInputBuilder
impl StructuralEq for ProofInputBuilder
impl StructuralPartialEq for ProofInputBuilder
Auto Trait Implementations
impl RefUnwindSafe for ProofInputBuilder
impl Send for ProofInputBuilder
impl Sync for ProofInputBuilder
impl Unpin for ProofInputBuilder
impl UnwindSafe for ProofInputBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ReturnWasmAbi for T where
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for T where
T: IntoWasmAbi,
type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as IntoWasmAbi::Abi
sourcefn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more