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

Mapping egg configuration files #5

Open
devnote-dev opened this issue May 8, 2023 · 0 comments
Open

Mapping egg configuration files #5

devnote-dev opened this issue May 8, 2023 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@devnote-dev
Copy link
Member

Currently this is in place of the files field for the egg configuration object:

/// Represents the inner configuration of an [`Egg`].
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
pub struct EggConfig {
// FIXME: might not be able to implement this due to complexity
// pub files: HashMap<String, EggConfigDescriptor>,

This is because the files object can contain nested objects containing string, number, boolean and object values – it's potentially recursive, and really hard to convey in Rust due to type unions not being a thing. One workaround could be a C-style union which is more like an object or named tuple with all the potential values, but implementation complexity may be a problem with that.

@devnote-dev devnote-dev added enhancement New feature or request help wanted Extra attention is needed labels May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant