Feat: custom format_args for inlining variables into html templates
This commit is contained in:
1 parent
a8b1225c48
commit
e4b1f6ea0d
13 files changed
+886
-333
No files matched your search
@@ -0,0 +1,67 @@
|
||||
// #[macro_use]
|
||||
extern crate fstrings;
|
||||
|
||||
use bumpalo::collections::String;
|
||||
|
||||
// use dioxus_core::ifmt;
|
||||
// use fstrings::format_args_f;
|
||||
use bumpalo::core_alloc::fmt::Write;
|
||||
|
||||
fn main() {
|
||||
let bump = bumpalo::Bump::new();
|
||||
let b = ≎
|
||||
let world = "123";
|
||||
// dioxus_core::ifmt!(in b; "Hello {world}";);
|
||||
}
|
||||
|
||||
// let mut s = bumpalo::collections::String::new_in(b);
|
||||
// fstrings::write_f!(s, "Hello {world}");
|
||||
// dbg!(s);
|
||||
// let p = {
|
||||
// println!("hello, {}", &world);
|
||||
// ()
|
||||
// };
|
||||
// let g = format_args!("hello {world}", world = world);
|
||||
// let g = dioxus_core::ifmt!(in b, "Hello {world}");
|
||||
// let g = ifmt!(in b, "hhello {world}");
|
||||
// let g = ::core::fmt::Arguments::new_v1(
|
||||
// &["hello "],
|
||||
// &match (&world,) {
|
||||
// (arg0,) => [::core::fmt::ArgumentV1::new(
|
||||
// arg0,
|
||||
// ::core::fmt::Display::fmt,
|
||||
// )],
|
||||
// },
|
||||
// );
|
||||
// fn main() {
|
||||
// let bump = bumpalo::Bump::new();
|
||||
// let b = ≎
|
||||
// let world = "123";
|
||||
// let world = 123;
|
||||
// let g = {
|
||||
// use bumpalo::core_alloc::fmt::Write;
|
||||
// use ::dioxus_core::prelude::bumpalo;
|
||||
// use ::dioxus_core::prelude::format_args_f;
|
||||
// let bump = b;
|
||||
// let mut s = bumpalo::collections::String::new_in(bump);
|
||||
// let _ = (&mut s).write_fmt(::core::fmt::Arguments::new_v1(
|
||||
// &[""],
|
||||
// &match (&::core::fmt::Arguments::new_v1(
|
||||
// &["hhello "],
|
||||
// &match (&world,) {
|
||||
// (arg0,) => [::core::fmt::ArgumentV1::new(
|
||||
// arg0,
|
||||
// ::core::fmt::Display::fmt,
|
||||
// )],
|
||||
// },
|
||||
// ),)
|
||||
// {
|
||||
// (arg0,) => [::core::fmt::ArgumentV1::new(
|
||||
// arg0,
|
||||
// ::core::fmt::Display::fmt,
|
||||
// )],
|
||||
// },
|
||||
// ));
|
||||
// s
|
||||
// };
|
||||
// }
|
||||
Reference in new issue
Block a user