Crates.io | stellar-notation |
lib.rs | stellar-notation |
version | 0.9.18 |
source | src |
created_at | 2021-08-14 01:18:43.077877 |
updated_at | 2021-09-15 15:10:24.323853 |
description | Rust library for encoding and decoding objects in Stellar Notation format. |
homepage | |
repository | https://github.com/seg-software/rust-stellar-notation |
max_upload_size | |
id | 435936 |
size | 8,033 |
Rust library for encoding and decoding objects in Stellar Notation format.
stellar-notation = "0.9.18"
use stellar_notation::{ encode, decode };
Type | Support |
---|---|
u8 | ✅ |
u16 | ✅ |
u32 | ✅ |
u64 | ✅ |
u128 | ✅ |
u256 | 🚧 |
i8 | 🚧 |
i16 | 🚧 |
i32 | 🚧 |
i64 | 🚧 |
i128 | 🚧 |
i256 | 🚧 |
f32 | 🚧 |
f64 | 🚧 |
bool | 🚧 |
list | ✅ |
bytes | ✅ |
let encoded_u8: String = encode::u8(1);
let integer: u8 = decode::as_u8(encoded_u8);
let encoded_bytes: String = encode::bytes(vec![1,2,3]);
let bytes: Vec<u8> = decode::as_bytes(encoded_bytes);
let encoded_list: String = encode::list(vec![encoded_u8_1, encoded_u8_2, encoded_u8_3]);
let list: Vec<String> = decode::as_list(encoded_list);
2021-09-14