docs.rs failed to build data-encoding-macro-0.1.4
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
data-encoding-macro-0.1.14
This library provides macros to define compile-time byte slices and arrays from encoded strings (using common bases like base64, base32, or hexadecimal, and also custom bases). It also provides a macro to define compile-time custom encodings to be used with the data-encoding crate.
If you were familiar with the binary_macros crate, this library is actually inspired from it.
If you use a nightly compiler, you may disable the "stable" feature:
data-encoding-macro = { version = "0.1.4", default-features = false }
Examples
You can define a compile-time byte slice or array (using the hexlower
or
base64
macros for example):
const HELLO: &'static = &hexlower!;
const FOOBAR: &'static = &base64!;
// In nightly, it is possible to define an array instead of a slice:
hexlower_array!;
base64_array!;
You can define a compile-time custom encoding using the new_encoding
macro:
const HEX: Encoding = new_encoding!;
const BASE64: Encoding = new_encoding!;
See the documentation for more details.