Struct clarity_repl::clarity::analysis::types::ContractAnalysis
source · [−]pub struct ContractAnalysis {Show 17 fields
pub contract_identifier: QualifiedContractIdentifier,
pub private_function_types: BTreeMap<ClarityName, FunctionType>,
pub variable_types: BTreeMap<ClarityName, TypeSignature>,
pub public_function_types: BTreeMap<ClarityName, FunctionType>,
pub read_only_function_types: BTreeMap<ClarityName, FunctionType>,
pub map_types: BTreeMap<ClarityName, (TypeSignature, TypeSignature)>,
pub persisted_variable_types: BTreeMap<ClarityName, TypeSignature>,
pub fungible_tokens: BTreeSet<ClarityName>,
pub non_fungible_tokens: BTreeMap<ClarityName, TypeSignature>,
pub defined_traits: BTreeMap<ClarityName, BTreeMap<ClarityName, FunctionSignature>>,
pub implemented_traits: BTreeSet<TraitIdentifier>,
pub contract_interface: Option<ContractInterface>,
pub is_cost_contract_eligible: bool,
pub dependencies: Vec<QualifiedContractIdentifier>,
pub expressions: Vec<SymbolicExpression>,
pub type_map: Option<TypeMap>,
pub cost_track: Option<LimitedCostTracker>,
}
Fields
contract_identifier: QualifiedContractIdentifier
private_function_types: BTreeMap<ClarityName, FunctionType>
variable_types: BTreeMap<ClarityName, TypeSignature>
public_function_types: BTreeMap<ClarityName, FunctionType>
read_only_function_types: BTreeMap<ClarityName, FunctionType>
map_types: BTreeMap<ClarityName, (TypeSignature, TypeSignature)>
persisted_variable_types: BTreeMap<ClarityName, TypeSignature>
fungible_tokens: BTreeSet<ClarityName>
non_fungible_tokens: BTreeMap<ClarityName, TypeSignature>
defined_traits: BTreeMap<ClarityName, BTreeMap<ClarityName, FunctionSignature>>
implemented_traits: BTreeSet<TraitIdentifier>
contract_interface: Option<ContractInterface>
is_cost_contract_eligible: bool
dependencies: Vec<QualifiedContractIdentifier>
expressions: Vec<SymbolicExpression>
type_map: Option<TypeMap>
cost_track: Option<LimitedCostTracker>
Implementations
sourceimpl ContractAnalysis
impl ContractAnalysis
pub fn new(
contract_identifier: QualifiedContractIdentifier,
expressions: Vec<SymbolicExpression>,
cost_track: LimitedCostTracker
) -> ContractAnalysis
pub fn take_contract_cost_tracker(&mut self) -> LimitedCostTracker
pub fn replace_contract_cost_tracker(&mut self, cost_track: LimitedCostTracker)
pub fn add_map_type(
&mut self,
name: ClarityName,
key_type: TypeSignature,
map_type: TypeSignature
)
pub fn add_variable_type(
&mut self,
name: ClarityName,
variable_type: TypeSignature
)
pub fn add_persisted_variable_type(
&mut self,
name: ClarityName,
persisted_variable_type: TypeSignature
)
pub fn add_read_only_function(
&mut self,
name: ClarityName,
function_type: FunctionType
)
pub fn add_public_function(
&mut self,
name: ClarityName,
function_type: FunctionType
)
pub fn add_private_function(
&mut self,
name: ClarityName,
function_type: FunctionType
)
pub fn add_non_fungible_token(
&mut self,
name: ClarityName,
nft_type: TypeSignature
)
pub fn add_fungible_token(&mut self, name: ClarityName)
pub fn add_defined_trait(
&mut self,
name: ClarityName,
function_types: BTreeMap<ClarityName, FunctionSignature>
)
pub fn add_implemented_trait(&mut self, trait_identifier: TraitIdentifier)
pub fn add_dependency(&mut self, dependency: QualifiedContractIdentifier)
pub fn get_public_function_type(&self, name: &str) -> Option<&FunctionType>
pub fn get_read_only_function_type(&self, name: &str) -> Option<&FunctionType>
pub fn get_private_function(&self, name: &str) -> Option<&FunctionType>
pub fn get_map_type(
&self,
name: &str
) -> Option<&(TypeSignature, TypeSignature)>
pub fn get_variable_type(&self, name: &str) -> Option<&TypeSignature>
pub fn get_persisted_variable_type(&self, name: &str) -> Option<&TypeSignature>
pub fn get_defined_trait(
&self,
name: &str
) -> Option<&BTreeMap<ClarityName, FunctionSignature>>
pub fn check_trait_compliance(
&self,
trait_identifier: &TraitIdentifier,
trait_definition: &BTreeMap<ClarityName, FunctionSignature>
) -> CheckResult<()>
Trait Implementations
sourceimpl ClarityDeserializable<ContractAnalysis> for ContractAnalysis
impl ClarityDeserializable<ContractAnalysis> for ContractAnalysis
fn deserialize(json: &str) -> Self
sourceimpl Clone for ContractAnalysis
impl Clone for ContractAnalysis
sourcefn clone(&self) -> ContractAnalysis
fn clone(&self) -> ContractAnalysis
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ContractAnalysis
impl Debug for ContractAnalysis
sourceimpl<'de> Deserialize<'de> for ContractAnalysis
impl<'de> Deserialize<'de> for ContractAnalysis
sourcefn 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
sourceimpl PartialEq<ContractAnalysis> for ContractAnalysis
impl PartialEq<ContractAnalysis> for ContractAnalysis
sourcefn eq(&self, other: &ContractAnalysis) -> bool
fn eq(&self, other: &ContractAnalysis) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ContractAnalysis) -> bool
fn ne(&self, other: &ContractAnalysis) -> bool
This method tests for !=
.
sourceimpl Serialize for ContractAnalysis
impl Serialize for ContractAnalysis
impl StructuralPartialEq for ContractAnalysis
Auto Trait Implementations
impl RefUnwindSafe for ContractAnalysis
impl Send for ContractAnalysis
impl Sync for ContractAnalysis
impl Unpin for ContractAnalysis
impl UnwindSafe for ContractAnalysis
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more