pub trait OutputType: Sized {
const IS_IDENT_REQUIRED: bool;
// Required methods
fn finish_fn(
span: Span,
ident: Option<Ident>,
f: Box<Function>,
) -> Result<Self, SyntaxError>;
fn finish_class(
span: Span,
ident: Option<Ident>,
class: Box<Class>,
) -> Result<Self, SyntaxError>;
// Provided method
fn is_fn_expr() -> bool { ... }
}
Required Associated Constants§
const IS_IDENT_REQUIRED: bool
Required Methods§
fn finish_fn( span: Span, ident: Option<Ident>, f: Box<Function>, ) -> Result<Self, SyntaxError>
fn finish_class( span: Span, ident: Option<Ident>, class: Box<Class>, ) -> Result<Self, SyntaxError>
Provided Methods§
Sourcefn is_fn_expr() -> bool
fn is_fn_expr() -> bool
From babel..
When parsing function expression, the binding identifier is parsed according to the rules inside the function. e.g. (function* yield() {}) is invalid because “yield” is disallowed in generators. This isn’t the case with function declarations: function* yield() {} is valid because yield is parsed as if it was outside the generator. Therefore, this.state.inGenerator is set before or after parsing the function id according to the “isStatement” parameter.
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.