1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
use uniserde::{impls::core::reference::BuilderRefValue, transform::build_from}; #[test] fn demo() { let x = String::from("a"); let y: &str = build_from::<BuilderRefValue<str>, _, _>(&*x).unwrap(); dbg!(y); let y: &String = uniserde::transform::from(&*x).unwrap(); dbg!(y); todo!(); } #[no_mangle] pub fn example(a: &str) -> &String { uniserde::transform::from(a).unwrap() }