[][src]Struct zamm_yang::codegen::template::basic::AppendedFragment

pub struct AppendedFragment {
    pub appendages: Vec<Rc<RefCell<dyn CodeFragment>>>,
    pub block_separator: String,
}

Code fragment that can be combined with other code fragments.

Think: function bodies (you can always append extra lines), class bodies (you can always append extra functions), etc.

Fields

appendages: Vec<Rc<RefCell<dyn CodeFragment>>>

Component fragments that make up this appended fragment.

block_separator: String

Separator between fragments when generating the body for this fragment.

Implementations

impl AppendedFragment[src]

pub fn new_with_separator(block_separator: &str) -> Self[src]

Create a new fragment with a custom separator between components.

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

Append other code fragment into this one.

Trait Implementations

impl CodeFragment for AppendedFragment[src]

impl Default for AppendedFragment[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any