Skip to content

Commit

Permalink
Merge branch 'serde' into serde-experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
benashford committed Mar 13, 2016
2 parents fb6fd5b + 6f15a0a commit b73712a
Show file tree
Hide file tree
Showing 13 changed files with 1,852 additions and 1,679 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ A non-exhaustive (and non-prioritised) list of unimplemented APIs:
0. Allow static &str for error messages.
0. Ensure all tests are in the same file as the code being tested.
0. Tests for aggregations
0. Not all options for all aggregations are currently implemented, these need to be checked and (re)enabled.
1. Decide whether it's best in structs that contain a "document" to box the document or not?
2. Re-enable UPDATE BULK option. (may be related to Script refactoring)
2. Find way of switching off source document when scan-and-scroll for deleting purposes.
Expand All @@ -402,6 +403,7 @@ A non-exhaustive (and non-prioritised) list of unimplemented APIs:
3. Move longer examples from README to the rustdocs instead.
4. rustc-serialize appears to be deprecated, retrofit `rs-es` to Serde: https://github.com/serde-rs/serde
5. Tests
6. Concrete (de)serialization for aggregations and aggregation results
6. Stop panicking on unexpected JSON, etc., to guard against surprises with future versions; return a result instead.
7. Metric aggregations can have an empty body (check: all or some of them?) when used as a sub-aggregation underneath certain other aggregations.
8. Top-hits aggregation (will share many not-yet implemented features (e.g. highlighting): https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-top-hits-aggregation.html
Expand Down
8 changes: 5 additions & 3 deletions src/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ impl<T> ShouldSkip for Option<T> {
}

/// No outer options
#[derive(Debug)]
///
/// Literally serializes to nothing
#[derive(Debug, Default)]
pub struct NoOuter;

impl Serialize for NoOuter {
Expand Down Expand Up @@ -108,14 +110,14 @@ impl<'a, F, I, O> MapVisitor for FieldBasedMapVisitor<'a, F, I, O>
}
}

struct MergeSerializer<'a, S: Serializer + 'a> {
pub struct MergeSerializer<'a, S: Serializer + 'a> {
underlying: &'a mut S
}

impl<'a, S> MergeSerializer<'a, S>
where S: Serializer {

fn new(u: &'a mut S) -> Self {
pub fn new(u: &'a mut S) -> Self {
MergeSerializer {underlying: u}
}
}
Expand Down

0 comments on commit b73712a

Please sign in to comment.