You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement serde::Serializer for Value, so we can build Value from the config struct itself. (Maybe implementing Into<Value> is enough?)
Implement Source/AsyncSourc for Value, so we can use the value as a source (it's trivial and makes sense, right?)
What do you think about this idea?
The text was updated successfully, but these errors were encountered:
Xuanwo
changed the title
proposal: Implement serde::Serialize and Source/AsyncSource for Value
proposal: Implement serde::Serializer and Source/AsyncSource for Value
Apr 15, 2022
I'm working on an app that uses
clap
for command line args parsing. I want to support loading configs in various ways with the specific rules:To avoid duplicate code, I'm trying to use:
To make our config values merge correctly, we should take values that parsed via
clap
as a source:In order to make that code works, we need:
serde::Serializer
forValue
, so we can buildValue
from the config struct itself. (Maybe implementingInto<Value>
is enough?)Source
/AsyncSourc
forValue
, so we can use the value as a source (it's trivial and makes sense, right?)What do you think about this idea?
The text was updated successfully, but these errors were encountered: