Struct wasm_utils::note::JsNoteBuilder
source · [−]pub struct JsNoteBuilder {Show 15 fields
pub protocol: Option<NoteProtocol>,
pub version: Option<NoteVersion>,
pub source_chain_id: Option<String>,
pub target_chain_id: Option<String>,
pub source_identifying_data: Option<String>,
pub target_identifying_data: Option<String>,
pub amount: Option<String>,
pub denomination: Option<u8>,
pub secrets: Option<Vec<Vec<u8>>>,
pub backend: Option<Backend>,
pub hash_function: Option<HashFunction>,
pub curve: Option<Curve>,
pub token_symbol: Option<String>,
pub exponentiation: Option<i8>,
pub width: Option<usize>,
}Fields
protocol: Option<NoteProtocol>version: Option<NoteVersion>source_chain_id: Option<String>target_chain_id: Option<String>source_identifying_data: Option<String>target_identifying_data: Option<String>amount: Option<String>denomination: Option<u8>secrets: Option<Vec<Vec<u8>>>backend: Option<Backend>hash_function: Option<HashFunction>curve: Option<Curve>token_symbol: Option<String>exponentiation: Option<i8>width: Option<usize>Implementations
sourceimpl JsNoteBuilder
impl JsNoteBuilder
pub fn new() -> Self
pub fn protocol(&mut self, protocol: Protocol) -> Result<(), JsValue>
pub fn version(&mut self, version: Version) -> Result<(), JsValue>
pub fn source_chain_id(&mut self, source_chain_id: JsString)
pub fn target_chain_id(&mut self, target_chain_id: JsString)
pub fn source_identifying_data(&mut self, source_identifying_data: JsString)
pub fn target_identifying_data(&mut self, target_identifying_data: JsString)
pub fn backend(&mut self, backend: BE)
pub fn hash_function(&mut self, hash_function: HF) -> Result<(), JsValue>
pub fn curve(&mut self, curve: WasmCurve) -> Result<(), JsValue>
pub fn token_symbol(&mut self, token_symbol: JsString)
pub fn amount(&mut self, amount: JsString)
pub fn denomination(&mut self, denomination: JsString) -> Result<(), JsValue>
pub fn exponentiation(
&mut self,
exponentiation: JsString
) -> Result<(), JsValue>
pub fn width(&mut self, width: JsString) -> Result<(), JsValue>
pub fn set_secrets(&mut self, secrets: JsString) -> Result<(), JsValue>
pub fn build(self) -> Result<JsNote, JsValue>
Trait Implementations
sourceimpl Default for JsNoteBuilder
impl Default for JsNoteBuilder
sourcefn default() -> JsNoteBuilder
fn default() -> JsNoteBuilder
Returns the “default value” for a type. Read more
sourceimpl From<JsNoteBuilder> for JsValue
impl From<JsNoteBuilder> for JsValue
sourcefn from(value: JsNoteBuilder) -> Self
fn from(value: JsNoteBuilder) -> Self
Performs the conversion.
sourceimpl FromWasmAbi for JsNoteBuilder
impl FromWasmAbi for JsNoteBuilder
sourceimpl IntoWasmAbi for JsNoteBuilder
impl IntoWasmAbi for JsNoteBuilder
sourceimpl OptionFromWasmAbi for JsNoteBuilder
impl OptionFromWasmAbi for JsNoteBuilder
sourceimpl OptionIntoWasmAbi for JsNoteBuilder
impl OptionIntoWasmAbi for JsNoteBuilder
sourceimpl RefFromWasmAbi for JsNoteBuilder
impl RefFromWasmAbi for JsNoteBuilder
type Anchor = Ref<'static, JsNoteBuilder>
type Anchor = Ref<'static, JsNoteBuilder>
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 JsNoteBuilder
impl RefMutFromWasmAbi for JsNoteBuilder
type Anchor = RefMut<'static, JsNoteBuilder>
type Anchor = RefMut<'static, JsNoteBuilder>
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 JsNoteBuilder
impl WasmDescribe for JsNoteBuilder
Auto Trait Implementations
impl RefUnwindSafe for JsNoteBuilder
impl Send for JsNoteBuilder
impl Sync for JsNoteBuilder
impl Unpin for JsNoteBuilder
impl UnwindSafe for JsNoteBuilder
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