๐ Like include_str!(), but returns a data: URL
/// Look at this cat:
///
/// ]
/// )
struct Cat; |
cargo add jcbhmr-include-data-urluse jcbhmr_include_data_url::include_data_url;
/// ]
/// )
struct Cat;
fn main() {
const ASSET: &str = include_data_url!("./src/cat.jpg", "image/jpeg");
println!("You should navigate to this URL: {}", ASSET);
}cargo testLicensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Serde by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.