Releases: paritytech/scale-value
v0.18.0
0.18.0 (2024-11-15)
This release makes scale-value entirely no_std which is now using core::error::Error instead of std::error::Error as it was using before behind
the std feature. Because of that the std feature is now removed and the MSRV is bumped to 1.81.0. In addition it bumps a few dependencies to their latest versions.
Changed
- Remove std feature and make the crate fully no_std
- Update
scale-decode
to v0.16.0 - Update
scale-encode
to v0.10.0 - Update
yap
to v0.12.0 - Update
scale-bits
to v0.7.0 - Remove
scale-info
dependency and the re-export PortableRegistry - Bump MSRV to 1.81.0
- Replace
derive_more
withthiserror
Full Changelog: v0.17.0...v0.18.0
v0.17.0
v0.16.2
0.16.2 (2024-08-08)
This release adds scale_value::stringify::to_writer
and scale_value::stringify::to_writer_custom
(to align with the already present scale_value::stringify::from_str_custom
), and also exposes a new scale_value::stringiy::custom_formatters
containing a formatter for displaying things as hex.
scale_value::stringify::to_writer_custom
allows for custom formatting of values, including a "pretty" spaced/indented formatting and a "compact" formatting which removes all unnecessary spaces. It also allows customising of the indentation and for custom formatters to be applied, as well as displaying the contexts of values if desired.
See #52 for more information.
v0.16.1
0.16.1 (2024-07-24)
This release:
- Adds a "tracing decoder" (via
scale_value::scale::tracing::{decode_as_type,*}
), which is likescale_value::scale::decode_as_type
, but traces and hands back much more detail in case of a decoding failure, so that it's easier to track down where decoding failed. This is particularly useful when working with historic type information, which must be provided independently and could easily be misaligned with reality. (#52)
v0.16.0
v0.15.0
v0.14.1
0.14.1 (2024-03-04)
Added
A scale_value::decode_as_fields
function was added that can decode a series of values from some bytes given an iterator of type ids. Previously it was only possible through the scale_decode::DecodeAsFields
implementation of scale_value::Composite<()>
. With the new function scale_value::Composite<R::TypeId>
's can be decoded for any type resolver R
.
v0.14.0
0.14.0 (2024-02-27)
Changed
The crate now uses scale-type-resolver
to be generic over the provider of type information that is used when encoding and decoding Value
s.
One implication is that scale_decode::IntoVisitor
is now only implemented for Value<()>
and no longer for Value<u32>
. So Value::decode_from_type()
cannot be used anymore to create a Value<u32>
that keeps type id information. Instead you now use scale_value::scale::decode_as_type()
which can return the desired Value<u32>
.
v0.13.0
v0.12.0
0.12.0 (2023-08-02)
Bumps scale-encode
and scale-decode
to their latest versions (0.5 and 0.9 respectively).
One effect that this has is that structs containing compact encoded values, after being encoded, now decode to composite types that better
reflect their original shape. For example, Compact(MyWrapper { inner: 123 })
, when encoded, used to decode to Value::u128(123)
,
but now it decodes to Value::named_composite(vec![("inner", Value::u128(123))]).