Skip to content

Add a serde feature-flag that adds (De-)Serialize impls for public types #716

@vkahl

Description

@vkahl

I've got a use case where I'd like to store a Projection (created using Projection::from_control_points) in a database. Of course I can just store the control points and recalculate the projection every time I need it, but it would be much nicer to just serialize the Projection itself. A middle ground solution would be to store the transform and recreate the Projection using from_transform (which is way less expensive than from_control_points), but there's no accessor for the transform field, so that doesn't work either. The runtime cost of from_control_points is probably cheap compared to the image processing that happens afterwards, but adding a serde-feature would also reduces complexity/friction in downstream projects like mine and is kind of a convention in the rust ecosystem, so I think it's worth considering.

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