Struct clarity_repl::clarity::contexts::ContractContext[][src]

pub struct ContractContext {
    pub contract_identifier: QualifiedContractIdentifier,
    pub variables: HashMap<ClarityName, Value>,
    pub functions: HashMap<ClarityName, DefinedFunction>,
    pub defined_traits: HashMap<ClarityName, BTreeMap<ClarityName, FunctionSignature>>,
    pub implemented_traits: HashSet<TraitIdentifier>,
    pub persisted_names: HashSet<ClarityName>,
    pub meta_data_map: HashMap<ClarityName, DataMapMetadata>,
    pub meta_data_var: HashMap<ClarityName, DataVariableMetadata>,
    pub meta_nft: HashMap<ClarityName, NonFungibleTokenMetadata>,
    pub meta_ft: HashMap<ClarityName, FungibleTokenMetadata>,
    pub data_size: u64,
}

Fields

contract_identifier: QualifiedContractIdentifiervariables: HashMap<ClarityName, Value>functions: HashMap<ClarityName, DefinedFunction>defined_traits: HashMap<ClarityName, BTreeMap<ClarityName, FunctionSignature>>implemented_traits: HashSet<TraitIdentifier>persisted_names: HashSet<ClarityName>meta_data_map: HashMap<ClarityName, DataMapMetadata>meta_data_var: HashMap<ClarityName, DataVariableMetadata>meta_nft: HashMap<ClarityName, NonFungibleTokenMetadata>meta_ft: HashMap<ClarityName, FungibleTokenMetadata>data_size: u64

Implementations

impl ContractContext[src]

pub fn new(contract_identifier: QualifiedContractIdentifier) -> Self[src]

pub fn lookup_variable(&self, name: &str) -> Option<&Value>[src]

pub fn lookup_function(&self, name: &str) -> Option<DefinedFunction>[src]

pub fn lookup_trait_definition(
    &self,
    name: &str
) -> Option<BTreeMap<ClarityName, FunctionSignature>>
[src]

pub fn is_explicitly_implementing_trait(
    &self,
    trait_identifier: &TraitIdentifier
) -> bool
[src]

pub fn is_name_used(&self, name: &str) -> bool[src]

Trait Implementations

impl Clone for ContractContext[src]

impl<'de> Deserialize<'de> for ContractContext[src]

impl Serialize for ContractContext[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,