Crates.io | dialectic-tokio-serde |
lib.rs | dialectic-tokio-serde |
version | 0.1.0 |
source | src |
created_at | 2021-04-01 22:19:28.248424 |
updated_at | 2021-04-01 22:19:28.248424 |
description | A backend builder for the Dialectic crate using Serde serialization over Tokio transport |
homepage | https://github.com/boltlabs-inc/dialectic |
repository | https://github.com/boltlabs-inc/dialectic |
max_upload_size | |
id | 377067 |
size | 23,038 |
The dialectic-tokio-serde
crate provides Dialectic
Transmitter
and Receiver
types which are capable of sending/receiving any
serde-Serialize
/Deserialize
type. These are generic over their transport, and require three
additional parameters to function:
AsyncWrite
and AsyncRead
traits.dialectic_tokio_serde::Serializer
/Deserializer
for converting the sent/received types
to/from the wire format. PLEASE NOTE! These are not the serde Serializer
/Deserializer
traits
but rather similar traits which also define the possible output/input types of the
Serializer
/Deserializer.
Currently, two formats are implemented as sister crates:
dialectic-tokio-serde-bincode
crate, which when provided an AsyncWrite
/AsyncRead
transport enables serialization to/from the
bincode format and using the tokio_util
LengthDelimitedCodec
for a wire encoding.dialectic-tokio-serde-json
crate,
which when provided an AsyncWrite
/AsyncRead
transport enables serialization to/from the JSON
format and using the tokio_util
LinesCodec
for a wire encoding.