pub struct ContractAbi {
pub build_info: BuildInfoAbi,
pub docs: Vec<String>,
pub name: String,
pub constructors: Vec<EndpointAbi>,
pub upgrade_constructors: Vec<EndpointAbi>,
pub endpoints: Vec<EndpointAbi>,
pub promise_callbacks: Vec<EndpointAbi>,
pub events: Vec<EventAbi>,
pub esdt_attributes: Vec<EsdtAttributeAbi>,
pub has_callback: bool,
pub type_descriptions: TypeDescriptionContainerImpl,
}
Fields§
§build_info: BuildInfoAbi
§docs: Vec<String>
§name: String
§constructors: Vec<EndpointAbi>
§upgrade_constructors: Vec<EndpointAbi>
§endpoints: Vec<EndpointAbi>
§promise_callbacks: Vec<EndpointAbi>
§events: Vec<EventAbi>
§esdt_attributes: Vec<EsdtAttributeAbi>
§has_callback: bool
§type_descriptions: TypeDescriptionContainerImpl
Implementations§
Source§impl ContractAbi
impl ContractAbi
Sourcepub fn new(
build_info: BuildInfoAbi,
docs: &[&str],
name: &str,
has_callback: bool,
) -> Self
pub fn new( build_info: BuildInfoAbi, docs: &[&str], name: &str, has_callback: bool, ) -> Self
Used in code generation.
pub fn coalesce(&mut self, other: Self)
Sourcepub fn add_type_descriptions<T: TypeAbi>(&mut self)
pub fn add_type_descriptions<T: TypeAbi>(&mut self)
A type can provide more than 1 type descripions. For instance, a struct can also provide the descriptions of its fields.
Sourcepub fn get_crate_name(&self) -> &str
pub fn get_crate_name(&self) -> &str
Contract main crate name.
Sourcepub fn get_crate_name_for_code(&self) -> String
pub fn get_crate_name_for_code(&self) -> String
Contract main crate name, but with underscores instead of dashes.
pub fn generate_with_endpoints(endpoints: Vec<EndpointAbi>) -> Self
Sourcepub fn iter_all_exports(&self) -> impl Iterator<Item = &EndpointAbi>
pub fn iter_all_exports(&self) -> impl Iterator<Item = &EndpointAbi>
All exported functions: init, endpoints, promises callbacks.
Trait Implementations§
Source§impl Clone for ContractAbi
impl Clone for ContractAbi
Source§fn clone(&self) -> ContractAbi
fn clone(&self) -> ContractAbi
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 ContractAbi
impl Debug for ContractAbi
Source§impl Default for ContractAbi
impl Default for ContractAbi
Source§fn default() -> ContractAbi
fn default() -> ContractAbi
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ContractAbi
impl RefUnwindSafe for ContractAbi
impl Send for ContractAbi
impl Sync for ContractAbi
impl Unpin for ContractAbi
impl UnwindSafe for ContractAbi
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