Skip to content

Shorthand for multiple-level nestedness via dot paths #17

@disbolog

Description

@disbolog

Hi, I am using your crate extensively, a very nice one.

I was wondering if you could extend it to allow for shorthand notation to allow define structs via multiple subsequent dot-separated members, like this:

struct SomeStruct {
    some.nested.member.field: String,
}

which would expand to something like

struct SomeStruct {
    some: NestedStruct,
}

struct NestedStruct {
    member: FieldStruct,
}

struct FieldStruct {
    field: String,
}

I see how this idea might be half-baked, but would be nice if you could consider it.

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions