pub(super) trait ParseTarget<'input, const VERSION: u8, const OWNED: bool> {
type ItemWithLiteralLifetime;
type ItemWithStaticLifetime;
type Component: TryFrom<AstComponent, Error: Into<Error>>;
type Output;
// Required methods
fn literal(value: &'input str) -> Self::ItemWithLiteralLifetime;
fn component(
component: Self::Component,
) -> Result<Self::ItemWithLiteralLifetime, Error>;
fn optional(
value: Vec<Self::ItemWithLiteralLifetime>,
format: bool,
span: Span,
) -> Result<Self::ItemWithLiteralLifetime, Error>;
fn first(
value: Vec<Vec<Self::ItemWithLiteralLifetime>>,
span: Span,
) -> Result<Self::ItemWithLiteralLifetime, Error>;
fn parse(s: &'input str) -> Result<Self::Output, Error>;
}Available on crate feature
alloc and (crate features formatting or parsing) only.Required Associated Types§
type ItemWithLiteralLifetime
type ItemWithStaticLifetime
type Component: TryFrom<AstComponent, Error: Into<Error>>
type Output
Required Methods§
fn literal(value: &'input str) -> Self::ItemWithLiteralLifetime
fn component( component: Self::Component, ) -> Result<Self::ItemWithLiteralLifetime, Error>
fn optional( value: Vec<Self::ItemWithLiteralLifetime>, format: bool, span: Span, ) -> Result<Self::ItemWithLiteralLifetime, Error>
fn first( value: Vec<Vec<Self::ItemWithLiteralLifetime>>, span: Span, ) -> Result<Self::ItemWithLiteralLifetime, Error>
fn parse(s: &'input str) -> Result<Self::Output, Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".