Crate iref_macros
source ·Expand description
This is crate provides useful macros to build 'static URI/IRIs and URI/IRI
references at compile time. It is re-exported by the iref crate when the
macros feature is enabled.
§Basic usage
Using the iref crate, enable the macros feature and
use the uri! (resp. iri!) macro to build URI (resp. IRI) statically, or
the uri_ref! (resp iri_ref!) macro to build URI (resp. IRI) references
statically.
use iref::{Iri, IriRef, 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");Macros§
- Build an IRI with a
'staticlifetime at compile time. - Build an IRI reference with a
'staticlifetime at compile time. - Build an URI with a
'staticlifetime at compile time. - Build an URI reference with a
'staticlifetime at compile time.