Expand description
Defines a generic trait for version tolerant serialization and deserialization
and implements it for primitive data types using the bincode format.
The Revisioned trait is automatically implemented for the following primitives:
u8, u16, u32, u64, u128, usize, i8, i16, i32, i64, i128, isize,
f32, f64, char, str, String, Vec<T>, arrays up to 32 elements, Option<T>,
Box<T>, Bound<T>, Range<T>, Wrapping<T>, (A, B), (A, B, C), (A, B, C, D),
(A, B, C, D, E), Duration, SystemTime, HashMap<K, V>, BTreeMap<K, V>,
Result<T, E>, Cow<'_, T>, Decimal, regex::Regex, uuid::Uuid,
chrono::Duration, chrono::DateTime<Utc>, geo::Point, geo::LineString,
geo::Polygon, geo::MultiPoint, geo::MultiLineString, and geo::MultiPolygon.
Re-exports§
pub use crate::error::Error;pub use slice_reader::BorrowedReader;pub use slice_reader::SliceReader;pub use slice_reader::advance_read;pub use slice_reader::read_borrowed_bytes;pub use walk::EnumWalker;pub use walk::LeafWalker;pub use walk::LengthPrefixedBytes;pub use walk::MapEntry;pub use walk::MapWalker;pub use walk::OptionWalker;pub use walk::ResultWalker;pub use walk::SeqItem;pub use walk::SeqWalker;pub use walk::StructWalker;pub use walk::WalkRevisioned;pub use walk::read_enum_discriminant;
Modules§
- error
- implementations
- optimised
- Optimised wire format primitives.
- prelude
- slice_
reader - Helpers for advancing through revisioned bytes without building values.
- walk
- Structured, selective decoding of revisioned encodings.
Traits§
- Deserialize
Revisioned - Revisioned
- Trait that provides an interface for version aware serialization and deserialization.
- Serialize
Revisioned - Skip
Check Revisioned - Skip
Revisioned
Functions§
- from_
reader - Deserialize a revisioned type from a reader
- from_
slice - Deserialize a revisioned type from a slice of bytes
- skip_
check_ reader - Alias for
skip_check_revisioned. - skip_
check_ revisioned - skip_
check_ slice - skip_
reader - Alias for
skip_revisioned. - skip_
revisioned - skip_
slice - to_vec
- Serialize a revisioned type into a vec of bytes
- to_
writer - Serialize a revisioned type into a vec of bytes
Attribute Macros§
- revisioned
- Generates serialization and deserialization code as an implementation of
the
Revisionedtrait for structs and enums.