From 913bb8582f786e23bf4df21e8550f149ae4b6025 Mon Sep 17 00:00:00 2001 From: alecmocatta Date: Wed, 17 Oct 2018 15:52:34 +0100 Subject: [PATCH] v0.1.2 --- Cargo.toml | 4 ++-- README.md | 8 ++++---- src/lib.rs | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a7ab551..13863c2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "serde_traitobject" -version = "0.1.1" +version = "0.1.2" license = "Apache-2.0" authors = ["Alec Mocatta "] categories = ["development-tools","encoding","rust-patterns","network-programming"] @@ -12,7 +12,7 @@ This library enables the serialization of trait objects such that they can be se """ repository = "https://github.com/alecmocatta/serde_traitobject" homepage = "https://github.com/alecmocatta/serde_traitobject" -documentation = "https://docs.rs/serde_traitobject/0.1.1" +documentation = "https://docs.rs/serde_traitobject/0.1.2" readme = "README.md" [badges] diff --git a/README.md b/README.md index 7d32cd0..25e34f3 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ This library enables the serialization of trait objects such that they can be se For example, if you have multiple forks of a process, or the same binary running on each of a cluster of machines, this library would help you to send trait objects between them. -The heart of this crate is the [Serialize](https://docs.rs/serde_traitobject/0.1.1/serde_traitobject/trait.Serialize.html) and [Deserialize](https://docs.rs/serde_traitobject/0.1.1/serde_traitobject/trait.Deserialize.html) traits. They are automatically implemented for all `T: serde::Serialize` and all `T: serde::de::DeserializeOwned` respectively. +The heart of this crate is the [Serialize](https://docs.rs/serde_traitobject/0.1.2/serde_traitobject/trait.Serialize.html) and [Deserialize](https://docs.rs/serde_traitobject/0.1.2/serde_traitobject/trait.Deserialize.html) traits. They are automatically implemented for all `T: serde::Serialize` and all `T: serde::de::DeserializeOwned` respectively. Any trait can be made (de)serializable when made into a trait object by simply adding them as supertraits: @@ -34,12 +34,12 @@ struct Message(#[serde(with = "serde_traitobject")] Box); ``` There are two ways to use serde_traitobject to handle the (de)serialization: - * `#[serde(with = "serde_traitobject")]` [field attribute](https://serde.rs/attributes.html) on a boxed trait object, which instructs serde to use the [serialize](https://docs.rs/serde_traitobject/0.1.1/serde_traitobject/fn.serialize.html) and [deserialize](https://docs.rs/serde_traitobject/0.1.1/serde_traitobject/fn.deserialize.html) functions; - * The [Box](https://docs.rs/serde_traitobject/0.1.1/serde_traitobject/struct.Box.html), [Rc](https://docs.rs/serde_traitobject/0.1.1/serde_traitobject/struct.Rc.html) and [Arc](https://docs.rs/serde_traitobject/0.1.1/serde_traitobject/struct.Arc.html) structs, which are simple wrappers around their stdlib counterparts that automatically handle (de)serialization without needing the above annotation; + * `#[serde(with = "serde_traitobject")]` [field attribute](https://serde.rs/attributes.html) on a boxed trait object, which instructs serde to use the [serialize](https://docs.rs/serde_traitobject/0.1.2/serde_traitobject/fn.serialize.html) and [deserialize](https://docs.rs/serde_traitobject/0.1.2/serde_traitobject/fn.deserialize.html) functions; + * The [Box](https://docs.rs/serde_traitobject/0.1.2/serde_traitobject/struct.Box.html), [Rc](https://docs.rs/serde_traitobject/0.1.2/serde_traitobject/struct.Rc.html) and [Arc](https://docs.rs/serde_traitobject/0.1.2/serde_traitobject/struct.Arc.html) structs, which are simple wrappers around their stdlib counterparts that automatically handle (de)serialization without needing the above annotation; Additionally, there are several convenience traits implemented that extend their stdlib counterparts: - * [Any](https://docs.rs/serde_traitobject/0.1.1/serde_traitobject/trait.Any.html), [Debug](https://docs.rs/serde_traitobject/0.1.1/serde_traitobject/trait.Debug.html), [Display](https://docs.rs/serde_traitobject/0.1.1/serde_traitobject/trait.Display.html), [Error](https://docs.rs/serde_traitobject/0.1.1/serde_traitobject/trait.Error.html), [Fn](https://docs.rs/serde_traitobject/0.1.1/serde_traitobject/trait.Fn.html), [FnBox](https://docs.rs/serde_traitobject/0.1.1/serde_traitobject/trait.FnBox.html), [FnMut](https://docs.rs/serde_traitobject/0.1.1/serde_traitobject/trait.FnMut.html), [FnOnce](https://docs.rs/serde_traitobject/0.1.1/serde_traitobject/trait.FnOnce.html) + * [Any](https://docs.rs/serde_traitobject/0.1.2/serde_traitobject/trait.Any.html), [Debug](https://docs.rs/serde_traitobject/0.1.2/serde_traitobject/trait.Debug.html), [Display](https://docs.rs/serde_traitobject/0.1.2/serde_traitobject/trait.Display.html), [Error](https://docs.rs/serde_traitobject/0.1.2/serde_traitobject/trait.Error.html), [Fn](https://docs.rs/serde_traitobject/0.1.2/serde_traitobject/trait.Fn.html), [FnBox](https://docs.rs/serde_traitobject/0.1.2/serde_traitobject/trait.FnBox.html), [FnMut](https://docs.rs/serde_traitobject/0.1.2/serde_traitobject/trait.FnMut.html), [FnOnce](https://docs.rs/serde_traitobject/0.1.2/serde_traitobject/trait.FnOnce.html) These are automatically implemented on all (de)serializable implementors of their stdlib counterparts: diff --git a/src/lib.rs b/src/lib.rs index 69ba966..e3f86c2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -78,7 +78,7 @@ //! //! This currently requires Rust nightly. -#![doc(html_root_url = "https://docs.rs/serde_traitobject/0.1.1")] +#![doc(html_root_url = "https://docs.rs/serde_traitobject/0.1.2")] #![feature( unboxed_closures, fn_traits,