Struct eosio_codegen::Contract
source · [−]pub struct Contract { /* private fields */ }Expand description
An contract definition consisting of the configuration and module.
Implementations
sourceimpl Contract
impl Contract
sourcepub fn new(_config: TokenStream2, module: TokenStream2) -> Result<Self, Error>
pub fn new(_config: TokenStream2, module: TokenStream2) -> Result<Self, Error>
Creates a new contract from the given configuration and module
sourcepub fn vis(&self) -> &Visibility
pub fn vis(&self) -> &Visibility
Returns the visibility of the chain module.
pub fn has_main_struct(&self) -> bool
pub fn has_trait(&self, s: &str, trait_: &str) -> bool
pub fn has_primary_value_interface_trait(&self, s: &str) -> bool
pub fn has_secondary_value_interface_trait(&self, s: &str) -> bool
pub fn analyze_items(&mut self) -> Result<(), Error>
pub fn get_type_name(field: &Field) -> Result<String, Error>
pub fn add_packer(&mut self, name: &str) -> Result<(), Error>
pub fn generate_code(&self) -> Result<TokenStream2, Error>
pub fn get_items(self) -> Vec<Item>
pub fn is_action_impl_block(item_impl: &ItemImpl) -> Result<bool, Error>
Trait Implementations
impl Eq for Contract
impl StructuralEq for Contract
impl StructuralPartialEq for Contract
Auto Trait Implementations
impl RefUnwindSafe for Contract
impl !Send for Contract
impl !Sync for Contract
impl Unpin for Contract
impl UnwindSafe for Contract
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more