#iri #static #compile-time #macro #iref

macro static-iref

Build static IRI and IRI references at compile time

3 stable releases

3.0.0 Aug 23, 2023
2.0.0 Mar 18, 2022
1.0.0 Mar 31, 2020

#9 in #iri

Download history 2148/week @ 2024-10-30 2053/week @ 2024-11-06 2028/week @ 2024-11-13 2287/week @ 2024-11-20 2284/week @ 2024-11-27 2679/week @ 2024-12-04 2107/week @ 2024-12-11 1562/week @ 2024-12-18 175/week @ 2024-12-25 832/week @ 2025-01-01 2287/week @ 2025-01-08 3060/week @ 2025-01-15 3267/week @ 2025-01-22 2933/week @ 2025-01-29 3300/week @ 2025-02-05 2355/week @ 2025-02-12

12,158 downloads per month
Used in 98 crates (31 directly)

MIT/Apache

7KB
78 lines

Build IRI and IRI references at compile time

Crate informations License Documentation

This is a companion crate for iref providing macros to build 'static URI/IRIs and URI/IRI references at compile time.

Basic usage

Use the uri! (resp. iri!) macro to build URI (resp. IRI) statically, and the uri_ref! (resp iri_ref!) macro to build URI (resp. IRI) references statically.

use iref::{Iri, IriRef};
use static_iref::{iri, iri_ref};

const IRI: &'static Iri = iri!("https://www.rust-lang.org/foo/bar#frag");
const IRI_REF: &'static IriRef = iri_ref!("/foo/bar#frag");

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~3–4MB
~89K SLoC