Skip to content

Conversation

@m-kuzmin
Copy link
Collaborator

Changelog

  • Replace awkward Vcard {elelements: [[VElement]]} with a more type safe VCard { properties, ... } and implement Serialize & Deserialize for it.
  • Convert unit tests into doctests to make that code more useful.
  • Add docs.
  • Replace Vcard::add_* with Property::new_* constructors. Vcard only has a push method now.
  • Use more impl Into<T> as parameters to constructors to allow the user to suppy different types,
    which are efficiently converted into the appropriate types. For example:
Property::new("fn", ..);
Property::new(String::from("fn"), ..);
  • Remove the {cc: AT} parameter from the address property. This parameter is not required by
    RFC 6350 (vCard) nor RFC 7095 (jCard), so it was removed. If you rely on this parameter, please add it at
    the call site.

  • Add @m-kuzmin to the crate authors in Cargo.toml

- Replace awkward `Vcard {[[VElement]]}` with a struct and custom `impl Serialize` for it
  (Deserialize is not fully supported yet, only some types have the `derive`)
- Convert `mod tests` into doctests to make that code more useful.
- Add documentation
- Replace `Vcard::add_*`, `Property::new_*` constructors are used. `Vcard` only has a `push` method now.
- Use more `impl Into<T>` as parameters to constructors to allow the user to suppy more types
  which are efficiently converted into the appropriate types.
- Remove the `{cc: AT}` parameter from the address property. This parameter is not required by
  RFC 6350 (vCard) nor RFC 7095 (jCard), so it was removed. If you rely on this parameter, please add it at
  the call site.

BREAKING CHANGE: Major changes to the crate's API.
- Translate the readme to English
- Add more docs to `cargo doc` pages

- Fail serialization if the values array is empty.
@m-kuzmin m-kuzmin requested a review from orzklv April 26, 2025 03:53
@orzklv
Copy link
Member

orzklv commented Apr 26, 2025

Good so far, LGTM! @m-kuzmin thank you for your contributions. I'll try to update working production with the latest version for deployment references.

@orzklv orzklv merged commit 1a39b90 into uzinfocom-org:main Apr 26, 2025
3 checks passed
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