Registry / serialization / scale-decode

scale-decode

JSON →
library0.16.2rscratesunverified

Decode SCALE encoded bytes into arbitrary types at runtime

# Cargo.toml [dependencies] scale-decode = "0.16.2"
INSTALL
IMPORT
SIG · SCALE-DECODE
S
scale-decode
serializationrustv0.16.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DecodeAsType
use scale_decode::DecodeAsType;

Decode SCALE bytes into a u8 value

use scale_decode::DecodeAsType; fn main() { let bytes = vec![0x00]; let val: u8 = DecodeAsType::decode_as_type(&mut &bytes[..], &()).unwrap(); println!("{}", val); }
Debug
Known issues
gotchaRequires understanding of SCALE encoding format
fix
Refer to Substrate documentation for SCALE encoding details
affects: >=0.16.0
Upgrade
Version history
0.16.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
scale-decode — cargo add scale-decode · libregistry