[−][src]Struct zamm_yang::codegen::template::basic::ItemDeclaration
Fragment containing all universal modifiers for an item declaration.
Fields
doc: Option<String>
Documentation string for the item.
public: bool
Whether or not this item should be publicly exported out of the module.
attributes: Vec<String>
Attributes to be added to the item.
definition: Rc<RefCell<dyn CodeFragment>>
Actual definition of the item, whether it be a variable, function, or module.
body: Option<Rc<RefCell<dyn CodeFragment>>>
Some items, such as functions and submodules, may have actual implementations that go along with their declaration.
Implementations
impl ItemDeclaration
[src]
pub fn new(definition: Rc<RefCell<dyn CodeFragment>>) -> Self
[src]
Create a new item declaration.
pub fn set_definition(&mut self, definition: Rc<RefCell<dyn CodeFragment>>)
[src]
Set the fragment that defines this item.
Trait Implementations
impl Clone for ItemDeclaration
[src]
pub fn clone(&self) -> ItemDeclaration
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl CodeFragment for ItemDeclaration
[src]
impl Default for ItemDeclaration
[src]
impl ItemDeclarationAPI for ItemDeclaration
[src]
pub fn mark_as_public(&mut self)
[src]
pub fn is_public(&self) -> bool
[src]
pub fn add_attribute(&mut self, attribute: String)
[src]
pub fn document(&mut self, documentation: String)
[src]
pub fn set_body(&mut self, body: Rc<RefCell<dyn CodeFragment>>)
[src]
pub fn mark_as_declare_only(&mut self)
[src]
pub fn mark_for_full_implementation(&mut self)
[src]
Auto Trait Implementations
impl !RefUnwindSafe for ItemDeclaration
impl !Send for ItemDeclaration
impl !Sync for ItemDeclaration
impl Unpin for ItemDeclaration
impl !UnwindSafe for ItemDeclaration
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,