Skip to content

Conversation

JamieTsai1024
Copy link
Contributor

@JamieTsai1024 JamieTsai1024 commented Jul 3, 2025

  • Add custom serde_conv macro, my_serde_conv, to:
    1. Support rustdoc documentation for structs
    2. Support serializers that may fail by wrapping the return type for serialize in a Result
      • Original implementation assumes that serialization cannot fail, which is not the case for many of our converters. For example, serializing a String to ObjectId may fail in object_id::FromHexString.
  • Refactor full struct (de)serialize_as implementations to use my_serde_conv macro
    • object_id::AsHexString
    • object_id::FromHexString

@JamieTsai1024 JamieTsai1024 marked this pull request as ready for review July 3, 2025 15:29
@JamieTsai1024 JamieTsai1024 requested a review from a team as a code owner July 3, 2025 15:29
@JamieTsai1024 JamieTsai1024 requested a review from abr-egn July 3, 2025 15:29
@isabelatkinson isabelatkinson removed the request for review from abr-egn July 3, 2025 15:43
@JamieTsai1024 JamieTsai1024 requested a review from abr-egn July 3, 2025 18:33
Copy link
Contributor

@abr-egn abr-egn left a comment

Choose a reason for hiding this comment

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

LGTM!

@JamieTsai1024 JamieTsai1024 merged commit 7703fee into mongodb:main Jul 7, 2025
9 of 11 checks passed
@JamieTsai1024 JamieTsai1024 changed the title Rust 1748 Add serde_conv macro for object_id::AsHexString and object_id::FromHexString RUST-1748 Add serde_conv macro for object_id::AsHexString and object_id::FromHexString Jul 8, 2025
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.

2 participants