Skip to content

Make embassy_net Config const-constructable #4607

@kleinesfilmroellchen

Description

@kleinesfilmroellchen

While the configuration functions like dhcpv4() are const, since the structs involved are non-exhaustive, and Default cannot be used in const contexts (like any trait method), they cannot be constructed in a const context. This precludes the configuration from being put into ROM/Flash memory via static or const, which could save quite a bit of space especially considering that many devices have more ROM than RAM available.

All that is needed here is a default-like method on all the affected configuration structs that is const.

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