pub struct ContractIface {
pub state: ContractState,
pub iface: IfaceImpl,
}
Expand description
Contract state is an in-memory structure providing API to read structured
data from the rgb::ContractHistory
.
Fields§
§state: ContractState
§iface: IfaceImpl
Implementations§
Source§impl ContractIface
impl ContractIface
pub fn contract_id(&self) -> ContractId
Sourcepub fn global(
&self,
name: impl Into<FieldName>,
) -> Result<SmallVec<StrictVal>, ContractError>
pub fn global( &self, name: impl Into<FieldName>, ) -> Result<SmallVec<StrictVal>, ContractError>
§Panics
If data are corrupted and contract schema doesn’t match interface implementations.
pub fn fungible( &self, name: impl Into<FieldName>, filter: &impl OutpointFilter, ) -> Result<LargeVec<FungibleAllocation>, ContractError>
pub fn outpoint( &self, _outpoint: Outpoint, ) -> LargeOrdMap<AssignmentType, LargeVec<TypedState>>
Trait Implementations§
Source§impl AsRef<ContractIface> for Rgb20
impl AsRef<ContractIface> for Rgb20
Source§fn as_ref(&self) -> &ContractIface
fn as_ref(&self) -> &ContractIface
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<ContractIface> for Rgb21
impl AsRef<ContractIface> for Rgb21
Source§fn as_ref(&self) -> &ContractIface
fn as_ref(&self) -> &ContractIface
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<ContractIface> for Rgb25
impl AsRef<ContractIface> for Rgb25
Source§fn as_ref(&self) -> &ContractIface
fn as_ref(&self) -> &ContractIface
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Borrow<ContractIface> for Rgb20
impl Borrow<ContractIface> for Rgb20
Source§fn borrow(&self) -> &ContractIface
fn borrow(&self) -> &ContractIface
Immutably borrows from an owned value. Read more
Source§impl Borrow<ContractIface> for Rgb21
impl Borrow<ContractIface> for Rgb21
Source§fn borrow(&self) -> &ContractIface
fn borrow(&self) -> &ContractIface
Immutably borrows from an owned value. Read more
Source§impl Borrow<ContractIface> for Rgb25
impl Borrow<ContractIface> for Rgb25
Source§fn borrow(&self) -> &ContractIface
fn borrow(&self) -> &ContractIface
Immutably borrows from an owned value. Read more
Source§impl Clone for ContractIface
impl Clone for ContractIface
Source§fn clone(&self) -> ContractIface
fn clone(&self) -> ContractIface
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 ContractIface
impl Debug for ContractIface
Source§impl From<ContractIface> for Rgb20
impl From<ContractIface> for Rgb20
Source§fn from(iface: ContractIface) -> Self
fn from(iface: ContractIface) -> Self
Converts to this type from the input type.
Source§impl From<ContractIface> for Rgb21
impl From<ContractIface> for Rgb21
Source§fn from(iface: ContractIface) -> Self
fn from(iface: ContractIface) -> Self
Converts to this type from the input type.
Source§impl From<ContractIface> for Rgb25
impl From<ContractIface> for Rgb25
Source§fn from(iface: ContractIface) -> Self
fn from(iface: ContractIface) -> Self
Converts to this type from the input type.
Source§impl From<Rgb20> for ContractIface
impl From<Rgb20> for ContractIface
Source§impl From<Rgb21> for ContractIface
impl From<Rgb21> for ContractIface
Source§impl From<Rgb25> for ContractIface
impl From<Rgb25> for ContractIface
Source§impl PartialEq for ContractIface
impl PartialEq for ContractIface
impl Eq for ContractIface
impl StructuralPartialEq for ContractIface
Auto Trait Implementations§
impl Freeze for ContractIface
impl RefUnwindSafe for ContractIface
impl Send for ContractIface
impl Sync for ContractIface
impl Unpin for ContractIface
impl UnwindSafe for ContractIface
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
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.