All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
#![no_std]
in rmpv
feature="std"
(on by default)RmpRead
and RmpWrite
traits.std::io::Read
(and Write) are missing on #![no_std]
Bytes
and ByteBuf
wrappers, that implement RmpRead/RmpWrite for no_std targets.rmp::decode::read_str_from_slice
function for zero-copy reading strings from slices.rmp::decode::read_str_ref
, because it's useless and inconvenient.Debug
for MarkerReadError
.write_sint
, so it should mark positive values as unsigned integers. Before this change it marked signed integers larger than 4294967296
with I64 marker, which is not consistent with other MessagePack implementations. Now it should mark such integers with U64 marker.ValueWriteError
into I/O error.From
and Into
traits for u8
.read_int
function, which allows to read integer values and automatically cast to the expected result type even if they aren't the same. An additional OutOfRange
error will be returned in the case of failed numeric cast.NumValueReadError
enum with additional OutOfRange
variant to be able to detect whether integer decoding failed because of out of range.byteorder
dependency to 1.0.write_sint
now encodes 64-bit signed integers using the most compact representation.write_uint
now encodes 64-bit unsigned integers using the most compact representation.read_array_size
function to read_array_len
for consistency.read_map_size
function to read_map_len
for consistency.FixedValueWriteError
struct private. All functions, that previously returned such kind of error now return the Standard I/O error.Value
and ValueRef
enums and associated functions into the separate rmpv
crate.byteorder
crate errors, because since 0.5 there are no such errors.write_sint_eff
function - its functionality can now be done using write_sint
instead.write_uint_eff
function - its functionality can now be done using write_uint
instead.read_*_loosely
and read_*_fit
were removed in favor of generic read_int
function, which allows to read integral values and cast them to the specified result type even if they aren't the same.read_bin_borrow
function.is_*
methods for Value for checking its underlying value without explicit matching.as_*
methods for Value for borrowing its underlying value.Display
trait for Value
.to_owned
instead of to_string
while converting ValueRef
into Value
. This change improves ValueRef::to_owned()
method performance by approximately 10-20%.s Also after this change it's cheaper to decode directly into ValueRef
with further converting to owned value rather than decoding directly into Value
.rmp
, rmp-serialize
and rmp-serde
.ByteBuf
.BigEndianRead
trait to be implemented only for sized types.PositiveFixnum
marker to FixPos
.NegativeFixnum
marker to FixNeg
.FixedString
marker to FixStr
.FixedArray
marker to FixArray
.FixedMap
to FixMap
.rustc_serialize::Encoder
should encode signed integers using the most effective underlying representation.rustc_serialize::Decoder
should properly map integers to the result type if the decoded value fits in result type's range.ValueRef
value struct represents MessagePack'ed value, but unlike an owning Value
it owns nothing except its structure. It means that all strings and binaries it contains are borrowed from the byte array from which the value was created.BorrowRead
trait, which looks like a standard BufRead
but unlike the standard this has an explicit internal buffer lifetime, which allows to borrow from underlying buffer while mutating the type.ValueRef
with its own error category.ValueRef
with its own error category.ValueRef
to Value
.Copy
trait for Integer
and Float
enums.write_str
function allows to serialize the UTF-8 encoded strings the most efficient way.write_bin
function allows to serialize the binary array the most efficient way.std::error::Error
trait for error types.read_value
function to the rmp::decode
module.Value
struct to the root crate namespace.Value
algebraic data type, which represents an owning MessagePack object. It can be found in rmp::value
module.