pub struct HtmlPlugin {
pub chars: Vec<char>,
pub index: usize,
pub last_item_end: usize,
pub template: Template,
pub source_root_path: Option<Rc<PathBuf>>,
pub output_root_path: Option<Rc<PathBuf>>,
pub default_variables: HashMap<String, String>,
pub tag_logics: Vec<Rc<dyn TagLogic>>,
pub dependencies: Vec<Rc<PathBuf>>,
}
Fields§
§chars: Vec<char>
§index: usize
§last_item_end: usize
§template: Template
§source_root_path: Option<Rc<PathBuf>>
§output_root_path: Option<Rc<PathBuf>>
§default_variables: HashMap<String, String>
§tag_logics: Vec<Rc<dyn TagLogic>>
§dependencies: Vec<Rc<PathBuf>>
Implementations§
Source§impl HtmlPlugin
impl HtmlPlugin
pub fn new() -> HtmlPlugin
pub fn reset(&mut self)
pub fn read_file(&mut self, path: impl AsRef<Path>) -> Result<(), HtmlError>
pub fn parse_file(&mut self, file: &mut File) -> Result<(), HtmlError>
pub fn parse(&mut self) -> Result<(), HtmlError>
pub fn parse_remaining_as_text(&mut self)
pub fn parse_comment(&mut self)
pub fn parse_opening_tag(&mut self) -> Result<bool, HtmlError>
pub fn parse_closing_tag(&mut self) -> Result<bool, HtmlError>
pub fn parse_attributes(&mut self) -> Result<(Attributes, bool), HtmlError>
pub fn process(&self, context: &mut TemplateContext)
pub fn try_find(&self, text: &[char]) -> Option<usize>
pub fn next_is(&self, text: &[char]) -> bool
pub fn peek(&self, len: usize) -> Option<&[char]>
pub fn is_eof(&self) -> bool
Trait Implementations§
Source§impl Debug for HtmlPlugin
impl Debug for HtmlPlugin
Source§impl Default for HtmlPlugin
impl Default for HtmlPlugin
Source§fn default() -> HtmlPlugin
fn default() -> HtmlPlugin
Returns the “default value” for a type. Read more
Source§impl Plugin for HtmlPlugin
impl Plugin for HtmlPlugin
fn extensions(&self) -> &[&str]
fn prepare(&mut self, context: &PluginContext)
fn process_file_to( &mut self, source_file: File, output_file: File, ) -> Result<(), Box<dyn Error>>
fn reset(&mut self)
fn get_dependencies(&mut self) -> Option<Vec<Rc<PathBuf>>>
fn init(&mut self, context: &PluginContext)
fn is_valid_extension(&self, extension: &str) -> bool
Auto Trait Implementations§
impl Freeze for HtmlPlugin
impl !RefUnwindSafe for HtmlPlugin
impl !Send for HtmlPlugin
impl !Sync for HtmlPlugin
impl Unpin for HtmlPlugin
impl !UnwindSafe for HtmlPlugin
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