[−][src]Struct zamm_yang::codegen::template::basic::FileFragment
Fragment for an entire code file. Doesn't actually implement CodeFragment
because this is
supposed to be top-level and not nested or appended to anything else.
Implementations
impl FileFragment
[src]
pub fn new() -> Self
[src]
Get a new default FileFragment to use.
pub fn set_preamble(&mut self, preamble: AtomicFragment)
[src]
Set a preamble for this file. Preambles are like hashbangs or module tags.
pub fn append(&mut self, fragment: Rc<RefCell<dyn CodeFragment>>)
[src]
Add another fragment to this top-level file fragment.
pub fn append_test(&mut self, test: Rc<RefCell<dyn CodeFragment>>)
[src]
Add test code to the test module for this file.
pub fn generate_code(&self) -> String
[src]
Get the code for this fragment.
Trait Implementations
impl Default for FileFragment
[src]
pub fn default() -> FileFragment
[src]
Auto Trait Implementations
impl !RefUnwindSafe for FileFragment
impl !Send for FileFragment
impl !Sync for FileFragment
impl Unpin for FileFragment
impl !UnwindSafe for FileFragment
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, 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,