Struct syntax::ast_map::blocks::FnLikeNode [−] [src]

pub struct FnLikeNode<'a> {
    // some fields omitted
}
Unstable

An FnLikeNode is a Node that is like a fn, in that it has a decl and a body (as well as a NodeId, a span, etc).

More specifically, it is one of either: - A function item, - A closure expr (i.e. an ExprClosure), or - The default implementation for a trait method.

To construct one, use the Code::from_node function.

Methods

impl<'a> FnLikeNode<'a>

fn to_fn_parts(self) -> FnParts<'a>

Unstable

fn body(self) -> &'a Block

Unstable

fn decl(self) -> &'a FnDecl

Unstable

fn span(self) -> Span

Unstable

fn id(self) -> NodeId

Unstable

fn kind(self) -> FnKind<'a>

Unstable

Trait Implementations

Derived Implementations

impl<'a> Clone for FnLikeNode<'a>

fn clone(&self) -> FnLikeNode<'a>

fn clone_from(&mut self, source: &Self)

impl<'a> Copy for FnLikeNode<'a>