Struct rgbstd::interface::ContractIface
source · 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 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<ContractIface> for ContractIface
impl PartialEq<ContractIface> for ContractIface
source§fn eq(&self, other: &ContractIface) -> bool
fn eq(&self, other: &ContractIface) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ContractIface
impl StructuralEq for ContractIface
impl StructuralPartialEq for ContractIface
Auto Trait Implementations§
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.