[][src]Trait zamm_yang::codegen::template::basic::ItemDeclarationAPI

pub trait ItemDeclarationAPI {
    pub fn mark_as_public(&mut self);
pub fn is_public(&self) -> bool;
pub fn document(&mut self, documentation: String);
pub fn add_attribute(&mut self, attribute: String);
pub fn set_body(&mut self, body: Rc<RefCell<dyn CodeFragment>>);
pub fn mark_as_declare_only(&mut self);
pub fn mark_for_full_implementation(&mut self); }

API for all items to be modified in the same way.

Required methods

pub fn mark_as_public(&mut self)[src]

Mark this as a public declaration.

pub fn is_public(&self) -> bool[src]

Whether this has been marked as a public declaration or not.

pub fn document(&mut self, documentation: String)[src]

Set the documentation for the fragment.

pub fn add_attribute(&mut self, attribute: String)[src]

Add an attribute to the declaration.

pub fn set_body(&mut self, body: Rc<RefCell<dyn CodeFragment>>)[src]

Set an implementation to go along with the declaration.

pub fn mark_as_declare_only(&mut self)[src]

Declares the item without implementing it.

pub fn mark_for_full_implementation(&mut self)[src]

Mark the module as requiring full implementation, even if that implementation is an empty one.

Loading content...

Implementors

impl ItemDeclarationAPI for FunctionFragment[src]

impl ItemDeclarationAPI for ImplementationFragment[src]

impl ItemDeclarationAPI for ItemDeclaration[src]

impl ItemDeclarationAPI for ModuleFragment[src]

impl ItemDeclarationAPI for TraitFragment[src]

Loading content...