Skip to content

Generate by-value getters #5

@michaelsproul

Description

@michaelsproul

Occasionally it's useful to be able to convert a struct into one of its fields without cloning, and without destructuring.

We could generate methods like:

pub fn into_field(self) -> Field {
    self.field
}

Although I'm not sure if it's worth the complexity

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions