pub trait ParseWithOptions<'i>: Sized {
// Required method
fn parse_with_options<'t>(
input: &mut Parser<'i, 't>,
options: &ParserOptions<'_, 'i>,
) -> Result<Self, ParseError<'i, ParserError<'i>>>;
// Provided method
fn parse_string_with_options(
input: &'i str,
options: ParserOptions<'_, 'i>,
) -> Result<Self, ParseError<'i, ParserError<'i>>> { ... }
}
Expand description
Trait for things that can be parsed from CSS syntax and require ParserOptions.
Required Methods§
Sourcefn parse_with_options<'t>(
input: &mut Parser<'i, 't>,
options: &ParserOptions<'_, 'i>,
) -> Result<Self, ParseError<'i, ParserError<'i>>>
fn parse_with_options<'t>( input: &mut Parser<'i, 't>, options: &ParserOptions<'_, 'i>, ) -> Result<Self, ParseError<'i, ParserError<'i>>>
Parse a value of this type with the given options.
Provided Methods§
Sourcefn parse_string_with_options(
input: &'i str,
options: ParserOptions<'_, 'i>,
) -> Result<Self, ParseError<'i, ParserError<'i>>>
fn parse_string_with_options( input: &'i str, options: ParserOptions<'_, 'i>, ) -> Result<Self, ParseError<'i, ParserError<'i>>>
Parse a value from a string with the given options.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.