cluConstData 2.1.2

Compile-time macros for building persistent data structures in no_std and const environments. Supports buffer composition, and numeric formatting.
docs.rs failed to build cluConstData-2.1.2
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: cluConstData-2.1.1

[cluconstdata]

(Compile-time macros for building persistent data structures in no_std and const environments. Supports buffer composition, and numeric formatting.)

CI

Usage

Add this to your Cargo.toml:

[dependencies]
cluConstData = "2.1.1"

and this to your source code:

use cluConstData::const_data;

Example

multi_consts

Purpose: Combine any values at compile time.

use cluConstData::const_data;

const_data! {
	pub(crate) const URL: &str = "https://", "api.example.com";
	const TIMEOUT_MS: u32 = 3000;
	const HEADERS: &[&str] = &["Accept"], &["Content-Type"];
}

fn main() {
	println!("Endpoint: {URL}");
	println!("Timeout: {TIMEOUT_MS} ms");
	println!("Headers: {HEADERS:?}");
}

License

This project has a dual license according to (LICENSE-MIT) and (LICENSE-APACHE-2-0).

 (Denis Kotlyarov).

Apache License