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

pub struct ContractContext {
    pub implemented_traits: HashSet<TraitIdentifier>,
    // some fields omitted
}

Fields

implemented_traits: HashSet<TraitIdentifier>

Implementations

impl ContractContext[src]

pub fn new() -> ContractContext[src]

pub fn check_name_used(&self, name: &str) -> CheckResult<()>[src]

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

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

pub fn add_public_function_type(
    &mut self,
    name: ClarityName,
    func_type: FunctionType
) -> CheckResult<()>
[src]

pub fn add_read_only_function_type(
    &mut self,
    name: ClarityName,
    func_type: FunctionType
) -> CheckResult<()>
[src]

pub fn add_private_function_type(
    &mut self,
    name: ClarityName,
    func_type: FunctionType
) -> CheckResult<()>
[src]

pub fn add_map_type(
    &mut self,
    map_name: ClarityName,
    map_type: (TypeSignature, TypeSignature)
) -> CheckResult<()>
[src]

pub fn add_variable_type(
    &mut self,
    const_name: ClarityName,
    var_type: TypeSignature
) -> CheckResult<()>
[src]

pub fn add_persisted_variable_type(
    &mut self,
    var_name: ClarityName,
    var_type: TypeSignature
) -> CheckResult<()>
[src]

pub fn add_ft(&mut self, token_name: ClarityName) -> CheckResult<()>[src]

pub fn add_nft(
    &mut self,
    token_name: ClarityName,
    token_type: TypeSignature
) -> CheckResult<()>
[src]

pub fn add_trait(
    &mut self,
    trait_name: ClarityName,
    trait_signature: BTreeMap<ClarityName, FunctionSignature>
) -> CheckResult<()>
[src]

pub fn add_implemented_trait(
    &mut self,
    trait_identifier: TraitIdentifier
) -> CheckResult<()>
[src]

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

pub fn get_map_type(
    &self,
    map_name: &str
) -> Option<&(TypeSignature, TypeSignature)>
[src]

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

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

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

pub fn into_contract_analysis(self, contract_analysis: &mut ContractAnalysis)[src]

This function consumes the ContractContext, and puts the relevant information into the provided ContractAnalysis

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> 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, 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>,