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

TreeAny, accessors/rename, JSONPath #207

Merged
merged 48 commits into from
Apr 29, 2024
Merged

TreeAny, accessors/rename, JSONPath #207

merged 48 commits into from
Apr 29, 2024

Conversation

jordens
Copy link
Member

@jordens jordens commented Apr 29, 2024

From the changelog:

Changed

  • [breaking] The Traversal error enum has been split from the Error<E> enum to reduce genericism.
  • [breaking] Increment trait and blanket impl removed in favor of increment_result/
    Error::increment/Traversal::increment
  • Uncounted iteration is the default
  • [breaking] The traverse_by_key callback receives the field name as an Option<&'static str>
    (None in the case of arrays and tuple structs).
  • [breaking] Derive macro attributes: accessor/validation revamp: getter -> get, setter -> get_mut,
    and validate with more idiomatic and flexible usage and call sequencing.
  • [breaking] Metadata.separator() has been changed to only return the new maximum length for
    consistency and renamed to max_length(separator: &str).

Added

  • TreeAny to access nodes trough Any trait objects.
  • TreeKey::json_path() for JSON path notation .bar[5]
  • JsonPath: Keys
  • rename field attribute for derive macros
  • Counted iteration is supported (includung ExactSizeIterator) through the count()
    "augmentation" methods on the iterators.

Removed

  • [breaking] TreeKey::iter_*_unchecked() have been removed. Uncounted iteration is the default.

@jordens jordens requested a review from ryan-summers April 29, 2024 10:36
@jordens jordens enabled auto-merge April 29, 2024 11:57
Copy link
Member

@ryan-summers ryan-summers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot here, so I went over it the best I could, but wasn't able to look at some of the implementation in detail.

miniconf/src/tree.rs Outdated Show resolved Hide resolved
miniconf/src/tree.rs Outdated Show resolved Hide resolved
miniconf/src/tree.rs Show resolved Hide resolved
miniconf/src/error.rs Outdated Show resolved Hide resolved
miniconf/src/iter.rs Outdated Show resolved Hide resolved
miniconf/src/iter.rs Show resolved Hide resolved
miniconf/src/option.rs Outdated Show resolved Hide resolved
miniconf/src/option.rs Show resolved Hide resolved
miniconf/tests/option.rs Show resolved Hide resolved
@jordens jordens linked an issue Apr 29, 2024 that may be closed by this pull request
@jordens jordens linked an issue Apr 29, 2024 that may be closed by this pull request
@jordens jordens requested a review from ryan-summers April 29, 2024 12:52
@jordens jordens merged commit 9ae9066 into main Apr 29, 2024
15 checks passed
@jordens jordens deleted the any branch April 29, 2024 12:55
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.

get() -> Box<dyn Any>, set(Box<dyn Any>) more flexible path separators
2 participants