diff --git a/CHANGELOG.md b/CHANGELOG.md index 2cd88a54..9038bc37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# Version 0.4.0 (2020-10-05) + +* Add public getters for fields in meta type hierarchy [(#22)](https://github.com/paritytech +/scale-info/pull/22) +* Implement SCALE encoding and serde deserialization [(#19)](https://github.com/paritytech/scale +-info/pull/19) + # Version 0.3.0 (2020-07-03) * Remove string table, inline strings [(#17)](https://github.com/paritytech/scale-info/pull/17) diff --git a/Cargo.toml b/Cargo.toml index 749b0f0a..a529409e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "scale-info" -version = "0.3.0" +version = "0.4.0" authors = ["Parity Technologies "] edition = "2018" diff --git a/src/interner.rs b/src/interner.rs index 782f5352..b1af0dc3 100644 --- a/src/interner.rs +++ b/src/interner.rs @@ -32,7 +32,7 @@ use serde::{Deserialize, Serialize}; #[serde(transparent)] pub struct UntrackedSymbol { /// The index to the symbol in the interner table. - pub id: NonZeroU32, + id: NonZeroU32, #[serde(skip)] marker: PhantomData T>, } @@ -57,6 +57,13 @@ impl scale::Decode for UntrackedSymbol { } } +impl UntrackedSymbol { + /// Returns the index to the symbol in the interner table. + pub fn id(&self) -> NonZeroU32 { + self.id + } +} + /// A symbol from an interner. /// /// Can be used to resolve to the associated instance.