Struct rgbwallet::RgbInvoiceBuilder
source · pub struct RgbInvoiceBuilder(/* private fields */);Implementations§
source§impl RgbInvoiceBuilder
impl RgbInvoiceBuilder
pub fn new(beneficiary: impl Into<Beneficiary>) -> Self
pub fn with( contract_id: ContractId, beneficiary: impl Into<Beneficiary> ) -> Self
pub fn rgb20( contract_id: ContractId, beneficiary: impl Into<Beneficiary> ) -> Self
pub fn rgb20_anything(beneficiary: impl Into<Beneficiary>) -> Self
pub fn set_contract(self, contract_id: ContractId) -> Self
pub fn set_interface(self, name: &'static str) -> Self
pub fn set_operation(self, name: &'static str) -> Self
pub fn set_assignment(self, name: &'static str) -> Self
pub fn set_amount_raw(self, amount: u64) -> Self
pub fn set_amount( self, integer: u64, decimals: u64, precision: Precision ) -> Result<Self, Self>
sourcepub unsafe fn set_amount_approx(
self,
amount: f64,
precision: Precision
) -> Result<Self, Self>
pub unsafe fn set_amount_approx( self, amount: f64, precision: Precision ) -> Result<Self, Self>
Safety
The function may cause the loss of the information about the precise amout of the asset, since f64 type doesn’t provide full precision required for that.
pub fn set_chain(self, chain: impl Into<Chain>) -> Self
pub fn set_expiry_timestamp(self, expiry: i64) -> Self
pub fn add_transport( self, transport: &str ) -> Result<Self, (Self, TransportParseError)>
pub fn add_transport_raw(self, transport: RgbTransport) -> Self
pub fn add_transports<'a>( self, transports: impl IntoIterator<Item = &'a str> ) -> Result<Self, (Self, TransportParseError)>
pub fn add_transports_raw( self, transports: impl IntoIterator<Item = RgbTransport> ) -> Self
pub fn finish(self) -> RgbInvoice
Trait Implementations§
source§impl Clone for RgbInvoiceBuilder
impl Clone for RgbInvoiceBuilder
source§fn clone(&self) -> RgbInvoiceBuilder
fn clone(&self) -> RgbInvoiceBuilder
Returns a copy 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 moresource§impl Debug for RgbInvoiceBuilder
impl Debug for RgbInvoiceBuilder
source§impl PartialEq for RgbInvoiceBuilder
impl PartialEq for RgbInvoiceBuilder
source§fn eq(&self, other: &RgbInvoiceBuilder) -> bool
fn eq(&self, other: &RgbInvoiceBuilder) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for RgbInvoiceBuilder
impl StructuralEq for RgbInvoiceBuilder
impl StructuralPartialEq for RgbInvoiceBuilder
Auto Trait Implementations§
impl RefUnwindSafe for RgbInvoiceBuilder
impl Send for RgbInvoiceBuilder
impl Sync for RgbInvoiceBuilder
impl Unpin for RgbInvoiceBuilder
impl UnwindSafe for RgbInvoiceBuilder
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
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
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.