Module bincode

Module bincode 

Source
Expand description

Unified layer under development, for now rssn only provide campatible version choises.

Modules§

config
The config module is used to change the behavior of bincode’s encoding and decoding logic.
de
Decoder-based structs and traits.
enc
Encoder-based structs and traits.
error
Errors that can be encounting by Encoding and Decoding.
serde
Support for serde integration. Enable this with the serde feature.

Macros§

impl_borrow_decode
Helper macro to implement BorrowDecode for any type that implements Decode.
impl_borrow_decode_with_context
Helper macro to implement BorrowDecode for any type that implements Decode.

Traits§

BorrowDecode
Trait that makes a type able to be decoded, akin to serde’s Deserialize trait.
Decode
Trait that makes a type able to be decoded, akin to serde’s DeserializeOwned trait.
Encode
Any source that can be encoded. This trait should be implemented for all types that you want to be able to use with any of the encode_with methods.

Functions§

borrow_decode_from_slice
Attempt to decode a given type D from the given slice. Returns the decoded output and the amount of bytes read.
borrow_decode_from_slice_with_context
Attempt to decode a given type D from the given slice with Context. Returns the decoded output and the amount of bytes read.
decode_from_reader
Attempt to decode a given type D from the given Reader.
decode_from_slice
Attempt to decode a given type D from the given slice. Returns the decoded output and the amount of bytes read.
decode_from_slice_with_context
Attempt to decode a given type D from the given slice with Context. Returns the decoded output and the amount of bytes read.
decode_from_std_read
Decode type D from the given reader with the given Config. The reader can be any type that implements std::io::Read, e.g. std::fs::File.
decode_from_std_read_with_context
Decode type D from the given reader with the given Config and Context. The reader can be any type that implements std::io::Read, e.g. std::fs::File.
encode_into_slice
Encode the given value into the given slice. Returns the amount of bytes that have been written.
encode_into_std_write
Encode the given value into any type that implements std::io::Write, e.g. std::fs::File, with the given Config. See the config module for more information. Returns the amount of bytes written.
encode_into_writer
Encode the given value into a custom Writer.
encode_to_vec
Encode the given value into a Vec<u8> with the given Config. See the config module for more information.

Derive Macros§

BorrowDecode
Decode
Encode