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

feat: add from_value function for deserializing HCL Value. #348

Merged
merged 3 commits into from
May 21, 2024
Merged

Conversation

zkonge
Copy link
Contributor

@zkonge zkonge commented May 20, 2024

Add the from_value function to the value module, allowing users to convert a Value into a type T that implements serde::de::Deserialize.

Providing a convenient way to deserialize HCL Value into Rust types.

close #345

Add the `from_value` function to the `value` module, allowing users to convert a `Value` into a type `T` that implements `serde::de::Deserialize`.

Providing a convenient way to deserialize HCL `Value` into Rust types.
@zkonge zkonge requested a review from martinohmann as a code owner May 20, 2024 21:25
@zkonge
Copy link
Contributor Author

zkonge commented May 20, 2024

@martinohmann would you like the inline link in doc?
I changed the doc then it looks inconsistant now 🤔.

image

update: whatever, remove type link now, and it can be added back in the future.

@martinohmann
Copy link
Owner

LGTM, we can merge this once you fixed the failing doctest.

@martinohmann martinohmann merged commit 5d19b18 into martinohmann:main May 21, 2024
5 checks passed
@martinohmann
Copy link
Owner

Thanks!

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 this pull request may close these issues.

create hcl::value::from_value function just like hcl::value::to_value
2 participants