Diffstat (limited to 'tests/demo.rs')
| -rw-r--r-- | tests/demo.rs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/demo.rs b/tests/demo.rs index 27a3782..c0fe77e 100644 --- a/tests/demo.rs +++ b/tests/demo.rs @@ -6,6 +6,8 @@ fn demo() { // let y: &str = build_from_ref::<'_, 'static, BuilderRefValue<str>, _, _>(&*x).unwrap(); let y: &str = uniserde::transform::from_ref(&*x).unwrap(); dbg!(y); + let y: &str = example(&&&&&&&*x); + dbg!(y); // let y: &String = uniserde::transform::from(&*x).unwrap(); // dbg!(y); @@ -13,8 +15,10 @@ fn demo() { todo!(); } -// #[no_mangle] -// pub fn example<'a>(a: &&&&&&'a str) -> &'a str { -// // uniserde::transform::from(a).unwrap() -// build_from::<BuilderRefContext<str>, _, _>(a).unwrap() -// } +#[no_mangle] +pub fn example<'a>(a: &&&&&&'a str) -> &'a str { + // uniserde::transform::from(a).unwrap() + build_from_ref::<BuilderRefContext<str>, _, _>(a).unwrap() +} + +// default everything to value, have wrappers for context and static borrows |