Struct ryuji_rust::ryuji::Renderer
source · pub struct Renderer {
pub templates_dir: String,
pub components_dir: String,
pub file_extension: FileExtension,
}
Fields§
§templates_dir: String
§components_dir: String
§file_extension: FileExtension
Implementations§
source§impl Renderer
impl Renderer
pub fn new( templates_dir: String, components_dir: String, file_extension: FileExtension ) -> Self
pub fn concat_path(path1: &String, path2: &String) -> String
pub fn sanitize(text: &String) -> String
pub fn check_var_name_legality( var_name: &String, dot_allowed: bool ) -> Result<(), ErrorKind>
pub fn find_syntax_matches(template_content: &String) -> Vec<SyntaxMatch>
pub fn get_var(var_name: String, vars: &Vars) -> Result<&VarValue, ErrorKind>
pub fn render( &self, template_contents: String, vars: &mut Vars, recursion_layer: Option<usize> ) -> Result<String, ErrorKind>
pub fn render_template( &self, template_name: String, vars: &mut Vars, recursion_layer: Option<usize> ) -> Result<String, ErrorKind>
Auto Trait Implementations§
impl RefUnwindSafe for Renderer
impl Send for Renderer
impl Sync for Renderer
impl Unpin for Renderer
impl UnwindSafe for Renderer
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