Macro str_wrapper

Source
macro_rules! str_wrapper {
    (str = $data:expr) => { ... };
    (string = $data:expr) => { ... };
}
Expand description

See StrWrapper and StringWrapper.

ยงExample

let general_str = str_wrapper!(str = "hello");
let smart_pointer_str = str_wrapper!(str = Arc::<str>::from("hello"));
let general_string = str_wrapper!(str = "hello".to_string());
let smart_pointer_string = str_wrapper!(string = Arc::<String>::from("hello".to_string()));