Struct fervid_parser::SfcParser
source · pub struct SfcParser<'i, 'e, 'p> { /* private fields */ }Implementations§
source§impl SfcParser<'_, '_, '_>
impl SfcParser<'_, '_, '_>
sourcepub fn process_element_attributes(
&mut self,
raw_attributes: Vec<Attribute>,
attrs_or_bindings: &mut Vec<AttributeOrBinding>,
vue_directives: &mut Option<Box<VueDirectives>>
) -> bool
pub fn process_element_attributes( &mut self, raw_attributes: Vec<Attribute>, attrs_or_bindings: &mut Vec<AttributeOrBinding>, vue_directives: &mut Option<Box<VueDirectives>> ) -> bool
Returns true when v-pre is discovered
sourcepub fn try_parse_directive(
&mut self,
raw_attribute: Attribute,
attrs_or_bindings: &mut Vec<AttributeOrBinding>,
vue_directives: &mut Option<Box<VueDirectives>>
) -> Result<(), Attribute>
pub fn try_parse_directive( &mut self, raw_attribute: Attribute, attrs_or_bindings: &mut Vec<AttributeOrBinding>, vue_directives: &mut Option<Box<VueDirectives>> ) -> Result<(), Attribute>
Returns true if it was recognized as a directive (regardless if it was successfully parsed)
source§impl SfcParser<'_, '_, '_>
impl SfcParser<'_, '_, '_>
sourcepub fn parse_sfc(&mut self) -> Result<SfcDescriptor, ParseError>
pub fn parse_sfc(&mut self) -> Result<SfcDescriptor, ParseError>
Parses self.input as an SFC, producing an SfcDescriptor.
When Err(ParseError) is returned, that means unrecoverable error was discovered.
sourcepub fn parse_html_document_fragment(
&mut self
) -> Result<DocumentFragment, Error>
pub fn parse_html_document_fragment( &mut self ) -> Result<DocumentFragment, Error>
Adapted from swc_html_parser
source§impl SfcParser<'_, '_, '_>
impl SfcParser<'_, '_, '_>
pub fn parse_template_to_ir( &mut self, root_element: Element ) -> Option<SfcTemplateBlock>
Trait Implementations§
Auto Trait Implementations§
impl<'i, 'e, 'p> RefUnwindSafe for SfcParser<'i, 'e, 'p>
impl<'i, 'e, 'p> Send for SfcParser<'i, 'e, 'p>
impl<'i, 'e, 'p> Sync for SfcParser<'i, 'e, 'p>
impl<'i, 'e, 'p> Unpin for SfcParser<'i, 'e, 'p>
impl<'i, 'e, 'p> !UnwindSafe for SfcParser<'i, 'e, 'p>
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