automorph 0.2.0

Derive macros for bidirectional Automerge-Rust struct synchronization
Documentation
//! Custom save/load modules for use with the `#[automorph(with = "...")]` attribute.
//!
//! These modules provide custom serialization logic for types that don't
//! directly implement [`Automorph`](crate::Automorph).
//!
//! # Example
//!
//! ```rust
//! # #[cfg(feature = "chrono")]
//! # {
//! use automorph::Automorph;
//! use automerge::AutoCommit;
//! use chrono::{DateTime, Utc};
//!
//! #[derive(Automorph)]
//! struct Event {
//!     name: String,
//!
//!     #[automorph(with = "automorph::chrono_iso8601")]
//!     timestamp: DateTime<Utc>,
//! }
//!
//! fn main() {
//!     let mut doc = AutoCommit::new();
//!     let event = Event { name: "test".to_string(), timestamp: Utc::now() };
//!     event.save(&mut doc, automerge::ROOT, "event").unwrap();
//! }
//! # }
//! ```
//!
//! # Available Modules
//!
//! | Feature | Module | Type |
//! |---------|--------|------|
//! | `chrono` | [`chrono_iso8601`](crate::chrono_iso8601) | `DateTime<Utc>` |
//! | `uuid` | [`uuid_string`](crate::uuid_string) | `Uuid` |

#[cfg(feature = "chrono")]
pub mod chrono_iso8601;

#[cfg(feature = "uuid")]
pub mod uuid_string;