Skip to content

[FEATURE] Codable conformance #1

@skjiisa

Description

@skjiisa

Is your feature request related to a problem? Please describe.

Types that use Clamped properties lose automatic Codable conformance since Clamped itself does not conform to codable.

Describe the solution you'd like.

Clamped conforms to Codable when Value itself is Codable, encoding the wrapped value.

Describe alternatives you've considered.

Manual Codable conformance is still possible for types using Clamped properties, but it is much more work.

Additional context

It could be useful to also do this for other protocols such as Hashable.

I would be willing to give this a shot and might put up a PR for it soon.

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