pub struct ParserOptions {
pub css_strategy: CssStrategy,
pub dom_strategy: DomStrategy,
pub css_link_options: CssLinkOptions,
pub legal_comments: LegalComments,
}Expand description
Build/output options that affect parser-generated component templates.
Fields§
§css_strategy: CssStrategyStrategy for how component CSS is delivered.
dom_strategy: DomStrategyFallback DOM strategy for components without an authored Shadow root.
css_link_options: CssLinkOptionsLink-mode CSS filename/href options.
legal_comments: LegalCommentsLegal comment preservation strategy.
Implementations§
Source§impl ParserOptions
impl ParserOptions
Sourcepub fn try_new(
css_strategy: CssStrategy,
dom_strategy: DomStrategy,
css_file_name_template: &str,
css_public_base: Option<&str>,
legal_comments: LegalComments,
) -> Result<ParserOptions, ParserError>
pub fn try_new( css_strategy: CssStrategy, dom_strategy: DomStrategy, css_file_name_template: &str, css_public_base: Option<&str>, legal_comments: LegalComments, ) -> Result<ParserOptions, ParserError>
Create parser output options.
§Errors
Returns ParserError::Css when Link-mode CSS link options are invalid.
Trait Implementations§
Source§impl Clone for ParserOptions
impl Clone for ParserOptions
Source§fn clone(&self) -> ParserOptions
fn clone(&self) -> ParserOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParserOptions
impl Debug for ParserOptions
Source§impl Default for ParserOptions
impl Default for ParserOptions
Source§fn default() -> ParserOptions
fn default() -> ParserOptions
Returns the “default value” for a type. Read more
Source§impl From<(CssStrategy, DomStrategy)> for ParserOptions
impl From<(CssStrategy, DomStrategy)> for ParserOptions
Source§fn from(_: (CssStrategy, DomStrategy)) -> ParserOptions
fn from(_: (CssStrategy, DomStrategy)) -> ParserOptions
Converts to this type from the input type.
Source§impl From<CssStrategy> for ParserOptions
impl From<CssStrategy> for ParserOptions
Source§fn from(css_strategy: CssStrategy) -> ParserOptions
fn from(css_strategy: CssStrategy) -> ParserOptions
Converts to this type from the input type.
Source§impl From<DomStrategy> for ParserOptions
impl From<DomStrategy> for ParserOptions
Source§fn from(dom_strategy: DomStrategy) -> ParserOptions
fn from(dom_strategy: DomStrategy) -> ParserOptions
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ParserOptions
impl RefUnwindSafe for ParserOptions
impl Send for ParserOptions
impl Sync for ParserOptions
impl Unpin for ParserOptions
impl UnsafeUnpin for ParserOptions
impl UnwindSafe for ParserOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more