pub struct RgbInvoiceBuilder(/* private fields */);Implementations§
Source§impl RgbInvoiceBuilder
impl RgbInvoiceBuilder
pub fn new(beneficiary: impl Into<XChainNet<Beneficiary>>) -> RgbInvoiceBuilder
pub fn with( contract_id: ContractId, beneficiary: impl Into<XChainNet<Beneficiary>>, ) -> RgbInvoiceBuilder
pub fn set_contract(self, contract_id: ContractId) -> RgbInvoiceBuilder
pub fn set_schema(self, schema_id: SchemaId) -> RgbInvoiceBuilder
pub fn set_assignment_name( self, assignment_name: impl Into<FieldName>, ) -> RgbInvoiceBuilder
pub fn set_void(self) -> RgbInvoiceBuilder
pub fn set_amount_raw(self, amount: impl Into<Amount>) -> RgbInvoiceBuilder
pub fn set_amount( self, integer: u64, decimals: u64, precision: Precision, ) -> Result<RgbInvoiceBuilder, RgbInvoiceBuilder>
pub fn set_allocation_raw( self, allocation: impl Into<Allocation>, ) -> RgbInvoiceBuilder
pub fn set_allocation( self, token_index: u32, fraction: u64, ) -> Result<RgbInvoiceBuilder, RgbInvoiceBuilder>
Sourcepub unsafe fn set_amount_approx(
self,
amount: f64,
precision: Precision,
) -> Result<RgbInvoiceBuilder, RgbInvoiceBuilder>
pub unsafe fn set_amount_approx( self, amount: f64, precision: Precision, ) -> Result<RgbInvoiceBuilder, RgbInvoiceBuilder>
§Safety
The function may cause the loss of the information about the precise amount of the asset, since f64 type doesn’t provide full precision required for that.
pub fn set_expiry_timestamp(self, expiry: i64) -> RgbInvoiceBuilder
pub fn add_transport( self, transport: &str, ) -> Result<RgbInvoiceBuilder, (RgbInvoiceBuilder, TransportParseError)>
pub fn add_transport_raw(self, transport: RgbTransport) -> RgbInvoiceBuilder
pub fn add_transports<'a>( self, transports: impl IntoIterator<Item = &'a str>, ) -> Result<RgbInvoiceBuilder, (RgbInvoiceBuilder, TransportParseError)>
pub fn add_transports_raw( self, transports: impl IntoIterator<Item = RgbTransport>, ) -> RgbInvoiceBuilder
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 duplicate of the value. Read more
1.0.0 (const: unstable) · 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
impl Eq for RgbInvoiceBuilder
Source§impl PartialEq for RgbInvoiceBuilder
impl PartialEq for RgbInvoiceBuilder
impl StructuralPartialEq for RgbInvoiceBuilder
Auto Trait Implementations§
impl Freeze for RgbInvoiceBuilder
impl RefUnwindSafe for RgbInvoiceBuilder
impl Send for RgbInvoiceBuilder
impl Sync for RgbInvoiceBuilder
impl Unpin for RgbInvoiceBuilder
impl UnsafeUnpin 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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.