pub struct TemplateConfig {
pub primitives: HashMap<String, HashMap<usize, Box<ValueFormatter>>>,
pub expr_manager: ExpressionManager,
pub block_symbol: (String, String),
pub operators: Vec<OperatorSyntax>,
}Expand description
模板配置项
Fields§
§primitives: HashMap<String, HashMap<usize, Box<ValueFormatter>>>原语
expr_manager: ExpressionManager符号表达式渲染规则
block_symbol: (String, String)模板块符号
operators: Vec<OperatorSyntax>流程控制符号
Implementations§
Source§impl TemplateConfig
impl TemplateConfig
Sourcepub fn get_operator_by_start(&self, src: &str) -> Option<&OperatorSyntax>
pub fn get_operator_by_start(&self, src: &str) -> Option<&OperatorSyntax>
根据原始标记查询对应的匹配语法
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for TemplateConfig
impl !Send for TemplateConfig
impl !Sync for TemplateConfig
impl !UnwindSafe for TemplateConfig
impl Freeze for TemplateConfig
impl Unpin for TemplateConfig
impl UnsafeUnpin for TemplateConfig
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