[−][src]Struct rustc_middle::hir::map::blocks::FnLikeNode

pub struct FnLikeNode<'a> {
    node: Node<'a>,
}

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:

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

Fields

node: Node<'a>

Implementations

impl<'a> FnLikeNode<'a>[src]

pub fn from_node(node: Node<'_>) -> Option<FnLikeNode<'_>>[src]

Attempts to construct a FnLikeNode from presumed FnLike node input.

pub fn body(self) -> BodyId[src]

pub fn decl(self) -> &'a FnDecl<'a>[src]

pub fn span(self) -> Span[src]

pub fn id(self) -> HirId[src]

pub fn constness(self) -> Constness[src]

pub fn asyncness(self) -> IsAsync[src]

pub fn unsafety(self) -> Unsafety[src]

pub fn kind(self) -> FnKind<'a>[src]

pub(in hir::map::blocks) fn handle<A, I, M, C>(
    self,
    item_fn: I,
    method: M,
    closure: C
) -> A where
    I: FnOnce(ItemFnParts<'a>) -> A,
    M: FnOnce(HirId, Ident, &'a FnSig<'a>, Option<&'a Visibility<'a>>, BodyId, Span, &'a [Attribute]) -> A,
    C: FnOnce(ClosureParts<'a>) -> A, 
[src]

Trait Implementations

impl<'a> Clone for FnLikeNode<'a>[src]

impl<'a> Copy for FnLikeNode<'a>[src]

impl<'a> Debug for FnLikeNode<'a>[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for FnLikeNode<'a>

impl<'a> !Send for FnLikeNode<'a>

impl<'a> !Sync for FnLikeNode<'a>

impl<'a> Unpin for FnLikeNode<'a>

impl<'a> !UnwindSafe for FnLikeNode<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<'tcx, T> ArenaAllocatable<'tcx, ()> for T where
    T: Copy, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MaybeResult<T> for T[src]

type Error = !

impl<T> ToOwned for T where
    T: Clone, 
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]