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: IfaceImplImplementations§
source§impl ContractIface
impl ContractIface
sourcepub fn global(
&self,
name: impl Into<TypeName>
) -> Result<SmallVec<StrictVal>, ContractError>
pub fn global( &self, name: impl Into<TypeName> ) -> Result<SmallVec<StrictVal>, ContractError>
Panics
If data are corrupted and contract schema doesn’t match interface implementations.
pub fn fungible( &self, name: impl Into<TypeName> ) -> 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<'de> Deserialize<'de> for ContractIface
impl<'de> Deserialize<'de> for ContractIface
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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 ==.source§impl Serialize for ContractIface
impl Serialize for ContractIface
source§impl StrictDecode for ContractIface
impl StrictDecode for ContractIface
fn strict_decode(reader: &mut impl TypedRead) -> Result<Self, DecodeError>
source§impl StrictDumb for ContractIface
impl StrictDumb for ContractIface
fn strict_dumb() -> Self
source§impl StrictEncode for ContractIface
impl StrictEncode for ContractIface
fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>
source§impl StrictStruct for ContractIface
impl StrictStruct for ContractIface
const ALL_FIELDS: &'static [&'static str] = _
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
source§impl StrictType for ContractIface
impl StrictType for ContractIface
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB_STD
fn strict_name() -> Option<TypeName>
impl Eq for ContractIface
impl StrictProduct 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.