Skip to content

Commit 6668b79

Browse files
committed
Update crate level docs.
- Add supported versionize primitives. - Add known issue and limitation section. Signed-off-by: Andrei Sandu <[email protected]>
1 parent e1721a7 commit 6668b79

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

src/lib.rs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,20 @@
88
//! need to implement.
99
//!
1010
//! `VersionMap` exposes an API that maps the individual structure versions to
11-
//! a root version (see above: the data version for example). This mapping is required
12-
//! both when serializing or deserializing structures as we need to know which version of structure
13-
//! to serialize for a given target **data version
11+
//! a root version. This mapping is required both when serializing or deserializing structures as
12+
//! it needs to know which version of structure to serialize for a given target data version.
13+
//!
14+
//! The Versionize proc macro supports structures and enums.
15+
//! Supported primitives: u8, u16, u32, u64, usize, i8, i16, i32, i64, isize, char, f32, f64,
16+
//! String, Vec<T>, Arrays up to 32 elements, Box<T>, Wrapping<T>, Option<T>, FamStructWrapper<T>,
17+
//! and (T, U).
18+
//!
19+
//! Known issues and limitations:
20+
//! - Union serialization is not supported via the `Versionize` proc macro.
21+
//! - Implementing Versionize for non-repr(C) unions can result in undefined behaviour
22+
//! and MUST be avoided.
23+
//! - Versionize trait implementations for repr(C) unions must be backed by extensive testing.
24+
//! - Semantic serialization and deserialization is available only for structures.
1425
//!
1526
extern crate bincode;
1627
extern crate crc64;

0 commit comments

Comments
 (0)