pin_project_internal::pin_project::derive

Function make_proj_impl

source
fn make_proj_impl(
    cx: &Context<'_>,
    proj_body: &TokenStream,
    proj_ref_body: &TokenStream,
    proj_own_body: &TokenStream,
) -> TokenStream
Expand description

Creates an implementation of the projection methods.

On structs, both the project and project_ref methods are always generated, and the project_replace method is only generated if ProjReplace::span is Some.

On enums, only methods that the returned projected type is named will be generated.