Function parse_fn

Source
pub fn parse_fn(
    toks: &mut KTokenStream,
    tracer: &dyn KParserTracer,
) -> Result<MethodDeclToken, KParserError>
Expand description

helper function to parse the method/function declaration

fn answer_to_life_the_universe_and_everything() -> i32 {
    return 42;
}

fn foo<A, B>(x: A, y: B);

fn foo<T>(x: &[T]) where T: Debug {
// details elided
}

async fn regular_example() { }

async unsafe fn unsafe_example() { }