-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
serde support #25
Comments
proposalInspired by serde-hex, I want to make faster-hex cooperate with serde in such usages: // will get 0x prefixed, lower case hex string, like: "0x01020a0b"
struct Foo {
#[serde(with = "faster_hex::SerHex::<StrictPfx>")]
bar: Vec<u8>
} // will get no 0x prefixed, lower case hex string, like: "01020a0b"
struct Foo {
#[serde(with = "faster_hex::SerHex::<Strict>")]
bar: Vec<u8>
} // will get no 0x prefixed, upper case hex string, like: "01020A0B"
struct Foo {
#[serde(with = "faster_hex::SerHex::<StrictCap>")]
bar: Vec<u8>
} // will 0x prefixed, upper case hex string, like: "0x01020A0B"
struct Foo {
#[serde(with = "faster_hex::SerHex::<StrictPfxCap>")]
bar: Vec<u8>
} I want add two features to faster-hex feature
|
Found this feature and wanted to use it, but it's not yet released crates.io. :( Do you have plans to cut a new release? |
@SuperFluffy Yes, future release planned. |
Some design is needed,
to be as generic as possible while still meeting existing requirements https://github.com/nervosnetwork/ckb/blob/develop/util/jsonrpc-types/src/bytes.rs.
Support configuration 0x-prefix, case-sensitive, bytes/Vec, etc.
The text was updated successfully, but these errors were encountered: