pub struct SfcParser<'i, 'e, 'p> { /* private fields */ }

Implementations§

source§

impl SfcParser<'_, '_, '_>

source

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

source

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<'_, '_, '_>

source

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.

source

pub fn parse_html_document_fragment( &mut self ) -> Result<DocumentFragment, Error>

Adapted from swc_html_parser

source§

impl SfcParser<'_, '_, '_>

source

pub fn parse_template_to_ir( &mut self, root_element: Element ) -> Option<SfcTemplateBlock>

source§

impl<'i, 'e> SfcParser<'i, 'e, 'static>

source

pub fn new(input: &'i str, errors: &'e mut Vec<ParseError>) -> Self

Trait Implementations§

source§

impl<'i, 'e, 'p> Debug for SfcParser<'i, 'e, 'p>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> Send for Twhere T: ?Sized,

§

impl<T> Sync for Twhere T: ?Sized,