[−][src]Struct zamm_yang::codegen::template::basic::ModuleFragment
Fragment for a module declaration.
Implementations
impl ModuleFragment
[src]
pub fn new(name: String) -> Self
[src]
Create a new module with the given name.
pub fn new_file_module() -> Self
[src]
Create a new module that takes up an entire file.
pub fn new_test_module() -> Self
[src]
Create a new module with the name tests
.
pub fn add_submodule(&mut self, name: String) -> Rc<RefCell<ModuleFragment>>
[src]
Adds a submodule to the current module.
pub fn mark_as_test(&mut self)
[src]
Mark a module as being a test module.
pub fn mark_as_entire_file(&mut self)
[src]
Mark this for generation as an entire file. Skips generation of the mod preamble.
pub fn re_export(&mut self, export: String)
[src]
Re-export something so that it looks like it comes from this module.
This usually, but not always, refers to something hidden within a submodule of this module. You can also re-export things from other modules, and they will also appear as if they came from this one.
pub fn append(&mut self, fragment: Rc<RefCell<dyn CodeFragment>>)
[src]
Add a fragment to the internals of this module.
Trait Implementations
impl CodeFragment for ModuleFragment
[src]
impl Default for ModuleFragment
[src]
impl Eq for ModuleFragment
[src]
impl ItemDeclarationAPI for ModuleFragment
[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]
impl Ord for ModuleFragment
[src]
pub fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<ModuleFragment> for ModuleFragment
[src]
pub fn eq(&self, other: &Self) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<ModuleFragment> for ModuleFragment
[src]
Auto Trait Implementations
impl !RefUnwindSafe for ModuleFragment
impl !Send for ModuleFragment
impl !Sync for ModuleFragment
impl Unpin for ModuleFragment
impl !UnwindSafe for ModuleFragment
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<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[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, 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,