Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework ActiveValue #321

Closed
tyt2y3 opened this issue Nov 16, 2021 · 0 comments · Fixed by #340
Closed

Rework ActiveValue #321

tyt2y3 opened this issue Nov 16, 2021 · 0 comments · Fixed by #340
Assignees
Milestone

Comments

@tyt2y3
Copy link
Member

tyt2y3 commented Nov 16, 2021

Currently our ActiveValue looks like this:

pub struct ActiveValue<V>
where
    V: Into<Value>,
{
    value: Option<V>,
    state: ActiveValueState,
}

I am thinking to go back to a simple Enum:

pub enum ActiveValue<V>
where
    V: Into<Value>,
{
    Set(V),
    Unchanged(V),
    NotSet,
}

The overall API should remain the same, just that we should deprecate Unset(None) and favour NotSet instead.

@tyt2y3 tyt2y3 added this to the 0.5.x - Schema milestone Nov 16, 2021
@billy1624 billy1624 self-assigned this Nov 30, 2021
@billy1624 billy1624 changed the title Rework ActiveValue Rework ActiveValue Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants