Skip to content

Add frunk feature that derives LabelledGeneric for arrays to allow using Transmogrifier to select fields on generated array structs #99

@mbrobbel

Description

@mbrobbel
#[derive(frunk::labelled::LabelledGeneric)]
struct FooArray {
  a: BooleanArray,
  b: Uint32Array,
}

#[derive(frunk::labelled::LabelledGeneric)]
struct SelectA {
  a: BooleanArray,
}

let foo_array: FooArray = ...

// Select `a` from the FooArray
let select_a: SelectA = foo_array.transmogrify();

We could even generate these selector structs and add methods on the main array to use them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions