pub struct Template {
pub blocks: Vec<Block>,
}Fields§
§blocks: Vec<Block>Implementations§
Source§impl Template
impl Template
pub fn new(blocks: Vec<Block>) -> Self
pub fn encode(&self) -> Option<String>
pub fn decode(data: &str) -> Option<Self>
pub fn get_name(&self) -> Option<String>
pub fn add_block(&mut self, block: Block) -> &mut Self
pub fn set_var(&mut self, action: impl Into<String>, args: Args) -> &mut Self
pub fn set_var_bitwise( &mut self, bitwise_op: impl Into<String>, result: Item, a: Item, b: Item, ) -> &mut Self
pub fn if_var(&mut self, action: impl Into<String>, args: Args) -> &mut Self
pub fn else_block(&mut self) -> &mut Self
pub fn repeat(&mut self, action: impl Into<String>, args: Args) -> &mut Self
pub fn repeat_subaction( &mut self, action: impl Into<String>, sub_action: impl Into<String>, args: Args, ) -> &mut Self
pub fn open_bracket(&mut self) -> &mut Self
pub fn close_bracket(&mut self) -> &mut Self
pub fn open_bracket_repeat(&mut self) -> &mut Self
pub fn close_bracket_repeat(&mut self) -> &mut Self
pub fn control(&mut self, action: impl ToString, args: Args) -> &mut Self
pub fn call_function(&mut self, func: impl ToString, args: Args) -> &mut Self
pub fn print(&mut self, args: Args) -> &mut Self
pub fn start_function(name: impl ToString) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Template
impl<'de> Deserialize<'de> for Template
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Template
Auto Trait Implementations§
impl Freeze for Template
impl RefUnwindSafe for Template
impl Send for Template
impl Sync for Template
impl Unpin for Template
impl UnwindSafe for Template
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more