pub struct Function<'ast, N: Name<'ast>> {
pub name: N,
pub generator: bool,
pub params: PatternList<'ast>,
pub body: BlockNode<'ast, Statement<'ast>>,
}
Fields
name: N
generator: bool
params: PatternList<'ast>
body: BlockNode<'ast, Statement<'ast>>
Trait Implementations
sourceimpl<'ast> From<Function<'ast, MandatoryName<'ast>>> for Statement<'ast>
impl<'ast> From<Function<'ast, MandatoryName<'ast>>> for Statement<'ast>
sourcefn from(val: FunctionStatement<'ast>) -> Self
fn from(val: FunctionStatement<'ast>) -> Self
Converts to this type from the input type.
sourceimpl<'ast> From<Function<'ast, OptionalName<'ast>>> for Expression<'ast>
impl<'ast> From<Function<'ast, OptionalName<'ast>>> for Expression<'ast>
sourcefn from(val: FunctionExpression<'ast>) -> Expression<'ast>
fn from(val: FunctionExpression<'ast>) -> Expression<'ast>
Converts to this type from the input type.
sourceimpl<'ast, N: PartialEq + Name<'ast>> PartialEq<Function<'ast, N>> for Function<'ast, N>
impl<'ast, N: PartialEq + Name<'ast>> PartialEq<Function<'ast, N>> for Function<'ast, N>
impl<'ast, N: Copy + Name<'ast>> Copy for Function<'ast, N>
impl<'ast, N: Name<'ast>> StructuralPartialEq for Function<'ast, N>
Auto Trait Implementations
impl<'ast, N> RefUnwindSafe for Function<'ast, N>where
N: RefUnwindSafe,
impl<'ast, N> Send for Function<'ast, N>where
N: Send,
impl<'ast, N> !Sync for Function<'ast, N>
impl<'ast, N> Unpin for Function<'ast, N>where
N: Unpin,
impl<'ast, N> UnwindSafe for Function<'ast, N>where
N: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more