Created
September 13, 2024 02:45
-
-
Save matthunz/c66f1a14d6d77539d0b097adbaeaff2d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[allow(non_snake_case)] | |
fn App() -> Element { | |
{ | |
dioxus_core::internal::verify_component_called_as_component(App); | |
{ | |
let mut data = use_signal(|| <[_]>::into_vec( | |
#[rustc_box] | |
::alloc::boxed::Box::new([ | |
<[_]>::into_vec( | |
#[rustc_box] | |
::alloc::boxed::Box::new([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]), | |
), | |
]), | |
)); | |
let mut next_value = use_signal(|| 10); | |
let mut load_more = move || { | |
let mut new_row = Vec::new(); | |
for _ in 0..10 { | |
new_row.push(next_value()); | |
next_value += 1; | |
} | |
data.push(new_row); | |
}; | |
dioxus_core::Element::Ok({ | |
#[cfg(debug_assertions)] | |
{ | |
static __ORIGINAL_TEMPLATE: ::std::sync::OnceLock< | |
dioxus_core::internal::HotReloadedTemplate, | |
> = ::std::sync::OnceLock::new(); | |
fn __original_template() -> &'static dioxus_core::internal::HotReloadedTemplate { | |
if __ORIGINAL_TEMPLATE.get().is_none() { | |
_ = __ORIGINAL_TEMPLATE | |
.set( | |
dioxus_core::internal::HotReloadedTemplate::new( | |
None, | |
<[_]>::into_vec( | |
#[rustc_box] | |
::alloc::boxed::Box::new([ | |
dioxus_core::internal::HotReloadDynamicNode::Dynamic(0usize), | |
]), | |
), | |
<[_]>::into_vec( | |
#[rustc_box] | |
::alloc::boxed::Box::new([ | |
dioxus_core::internal::HotReloadDynamicAttribute::Dynamic( | |
0usize, | |
), | |
]), | |
), | |
::alloc::vec::Vec::new(), | |
&[ | |
{ | |
dioxus_core::TemplateNode::Element { | |
tag: dioxus_elements::elements::button::TAG_NAME, | |
namespace: dioxus_elements::button::NAME_SPACE, | |
attrs: &[ | |
dioxus_core::TemplateAttribute::Dynamic { | |
id: 0usize, | |
}, | |
], | |
children: &[ | |
dioxus_core::TemplateNode::Text { | |
text: "load more", | |
}, | |
], | |
} | |
}, | |
{ | |
dioxus_core::TemplateNode::Element { | |
tag: dioxus_elements::elements::div::TAG_NAME, | |
namespace: dioxus_elements::div::NAME_SPACE, | |
attrs: &[ | |
dioxus_core::TemplateAttribute::Static { | |
name: dioxus_elements::div::style.0, | |
namespace: dioxus_elements::div::style.1, | |
value: "display: grid; grid-template-columns: repeat(10, auto);", | |
}, | |
], | |
children: &[ | |
dioxus_core::TemplateNode::Dynamic { | |
id: 0usize, | |
}, | |
], | |
} | |
}, | |
], | |
), | |
); | |
} | |
__ORIGINAL_TEMPLATE.get().unwrap() | |
} | |
let __template = GlobalSignal::with_key( | |
|| None::<dioxus_core::internal::HotReloadedTemplate>, | |
{ | |
const PATH: &str = { | |
const ARGS_OSRCTFL4A: ::const_format::__str_methods::ReplaceInput = ::const_format::__str_methods::ReplaceInputConv( | |
"examples/clock.rs", | |
"\\\\", | |
"/", | |
) | |
.conv(); | |
{ | |
const OB: &[::const_format::pmr::u8; ARGS_OSRCTFL4A | |
.replace_length()] = &ARGS_OSRCTFL4A.replace(); | |
const OS: &::const_format::pmr::str = unsafe { | |
{ | |
let bytes: &'static [::const_format::pmr::u8] = OB; | |
let string: &'static ::const_format::pmr::str = { | |
::const_format::__hidden_utils::PtrToRef { | |
ptr: bytes as *const [::const_format::pmr::u8] as *const str, | |
} | |
.reff | |
}; | |
string | |
} | |
}; | |
OS | |
} | |
}; | |
const NORMAL: &str = { | |
const ARGS_OSRCTFL4A: ::const_format::__str_methods::ReplaceInput = ::const_format::__str_methods::ReplaceInputConv( | |
PATH, | |
'\\', | |
"/", | |
) | |
.conv(); | |
{ | |
const OB: &[::const_format::pmr::u8; ARGS_OSRCTFL4A | |
.replace_length()] = &ARGS_OSRCTFL4A.replace(); | |
const OS: &::const_format::pmr::str = unsafe { | |
{ | |
let bytes: &'static [::const_format::pmr::u8] = OB; | |
let string: &'static ::const_format::pmr::str = { | |
::const_format::__hidden_utils::PtrToRef { | |
ptr: bytes as *const [::const_format::pmr::u8] as *const str, | |
} | |
.reff | |
}; | |
string | |
} | |
}; | |
OS | |
} | |
}; | |
::const_format::pmr::__AssertStr { | |
x: { | |
use ::const_format::__cf_osRcTFl4A; | |
({ | |
#[doc(hidden)] | |
#[allow(unused_mut, non_snake_case)] | |
const CONCATP_NHPMWYD3NJA: &[__cf_osRcTFl4A::pmr::PArgument] = { | |
let fmt = __cf_osRcTFl4A::pmr::FormattingFlags::NEW; | |
&[ | |
__cf_osRcTFl4A::pmr::PConvWrapper(NORMAL) | |
.to_pargument_display(fmt), | |
__cf_osRcTFl4A::pmr::PConvWrapper(':') | |
.to_pargument_display(fmt), | |
__cf_osRcTFl4A::pmr::PConvWrapper(60u32) | |
.to_pargument_display(fmt), | |
__cf_osRcTFl4A::pmr::PConvWrapper(':') | |
.to_pargument_display(fmt), | |
__cf_osRcTFl4A::pmr::PConvWrapper(5u32) | |
.to_pargument_display(fmt), | |
__cf_osRcTFl4A::pmr::PConvWrapper(':') | |
.to_pargument_display(fmt), | |
__cf_osRcTFl4A::pmr::PConvWrapper(0usize) | |
.to_pargument_display(fmt), | |
] | |
}; | |
{ | |
#[doc(hidden)] | |
const ARR_LEN: usize = ::const_format::pmr::PArgument::calc_len( | |
CONCATP_NHPMWYD3NJA, | |
); | |
#[doc(hidden)] | |
const CONCAT_ARR: &::const_format::pmr::LenAndArray< | |
[u8; ARR_LEN], | |
> = &::const_format::pmr::__priv_concatenate( | |
CONCATP_NHPMWYD3NJA, | |
); | |
#[doc(hidden)] | |
#[allow(clippy::transmute_ptr_to_ptr)] | |
const CONCAT_STR: &str = unsafe { | |
let slice = ::const_format::pmr::transmute::< | |
&[u8; ARR_LEN], | |
&[u8; CONCAT_ARR.len], | |
>(&CONCAT_ARR.array); | |
{ | |
let bytes: &'static [::const_format::pmr::u8] = slice; | |
let string: &'static ::const_format::pmr::str = { | |
::const_format::__hidden_utils::PtrToRef { | |
ptr: bytes as *const [::const_format::pmr::u8] as *const str, | |
} | |
.reff | |
}; | |
string | |
} | |
}; | |
CONCAT_STR | |
} | |
}) | |
}, | |
} | |
.x | |
}, | |
); | |
let __template_read = dioxus_core::Runtime::current() | |
.ok() | |
.map(|_| __template.read()); | |
let __template_read = match __template_read | |
.as_ref() | |
.map(|__template_read| __template_read.as_ref()) | |
{ | |
Some(Some(__template_read)) => &__template_read, | |
_ => __original_template(), | |
}; | |
let mut __dynamic_literal_pool = dioxus_core::internal::DynamicLiteralPool::new( | |
::alloc::vec::Vec::new(), | |
); | |
let mut __dynamic_value_pool = dioxus_core::internal::DynamicValuePool::new( | |
<[_]>::into_vec( | |
#[rustc_box] | |
::alloc::boxed::Box::new([ | |
{ | |
let ___nodes = (data()) | |
.into_iter() | |
.map(|row| { | |
dioxus_core::Element::Ok({ | |
#[cfg(debug_assertions)] | |
{ | |
static __ORIGINAL_TEMPLATE: ::std::sync::OnceLock< | |
dioxus_core::internal::HotReloadedTemplate, | |
> = ::std::sync::OnceLock::new(); | |
fn __original_template() -> &'static dioxus_core::internal::HotReloadedTemplate { | |
if __ORIGINAL_TEMPLATE.get().is_none() { | |
_ = __ORIGINAL_TEMPLATE | |
.set( | |
dioxus_core::internal::HotReloadedTemplate::new( | |
None, | |
<[_]>::into_vec( | |
#[rustc_box] | |
::alloc::boxed::Box::new([ | |
dioxus_core::internal::HotReloadDynamicNode::Dynamic(0usize), | |
]), | |
), | |
::alloc::vec::Vec::new(), | |
::alloc::vec::Vec::new(), | |
&[ | |
{ | |
dioxus_core::TemplateNode::Element { | |
tag: dioxus_elements::elements::div::TAG_NAME, | |
namespace: dioxus_elements::div::NAME_SPACE, | |
attrs: &[], | |
children: &[ | |
dioxus_core::TemplateNode::Dynamic { | |
id: 0usize, | |
}, | |
], | |
} | |
}, | |
], | |
), | |
); | |
} | |
__ORIGINAL_TEMPLATE.get().unwrap() | |
} | |
let __template = GlobalSignal::with_key( | |
|| None::<dioxus_core::internal::HotReloadedTemplate>, | |
{ | |
const PATH: &str = { | |
const ARGS_OSRCTFL4A: ::const_format::__str_methods::ReplaceInput = ::const_format::__str_methods::ReplaceInputConv( | |
"examples/clock.rs", | |
"\\\\", | |
"/", | |
) | |
.conv(); | |
{ | |
const OB: &[::const_format::pmr::u8; ARGS_OSRCTFL4A | |
.replace_length()] = &ARGS_OSRCTFL4A.replace(); | |
const OS: &::const_format::pmr::str = unsafe { | |
{ | |
let bytes: &'static [::const_format::pmr::u8] = OB; | |
let string: &'static ::const_format::pmr::str = { | |
::const_format::__hidden_utils::PtrToRef { | |
ptr: bytes as *const [::const_format::pmr::u8] as *const str, | |
} | |
.reff | |
}; | |
string | |
} | |
}; | |
OS | |
} | |
}; | |
const NORMAL: &str = { | |
const ARGS_OSRCTFL4A: ::const_format::__str_methods::ReplaceInput = ::const_format::__str_methods::ReplaceInputConv( | |
PATH, | |
'\\', | |
"/", | |
) | |
.conv(); | |
{ | |
const OB: &[::const_format::pmr::u8; ARGS_OSRCTFL4A | |
.replace_length()] = &ARGS_OSRCTFL4A.replace(); | |
const OS: &::const_format::pmr::str = unsafe { | |
{ | |
let bytes: &'static [::const_format::pmr::u8] = OB; | |
let string: &'static ::const_format::pmr::str = { | |
::const_format::__hidden_utils::PtrToRef { | |
ptr: bytes as *const [::const_format::pmr::u8] as *const str, | |
} | |
.reff | |
}; | |
string | |
} | |
}; | |
OS | |
} | |
}; | |
::const_format::pmr::__AssertStr { | |
x: { | |
use ::const_format::__cf_osRcTFl4A; | |
({ | |
#[doc(hidden)] | |
#[allow(unused_mut, non_snake_case)] | |
const CONCATP_NHPMWYD3NJA: &[__cf_osRcTFl4A::pmr::PArgument] = { | |
let fmt = __cf_osRcTFl4A::pmr::FormattingFlags::NEW; | |
&[ | |
__cf_osRcTFl4A::pmr::PConvWrapper(NORMAL) | |
.to_pargument_display(fmt), | |
__cf_osRcTFl4A::pmr::PConvWrapper(':') | |
.to_pargument_display(fmt), | |
__cf_osRcTFl4A::pmr::PConvWrapper(60u32) | |
.to_pargument_display(fmt), | |
__cf_osRcTFl4A::pmr::PConvWrapper(':') | |
.to_pargument_display(fmt), | |
__cf_osRcTFl4A::pmr::PConvWrapper(5u32) | |
.to_pargument_display(fmt), | |
__cf_osRcTFl4A::pmr::PConvWrapper(':') | |
.to_pargument_display(fmt), | |
__cf_osRcTFl4A::pmr::PConvWrapper(1usize) | |
.to_pargument_display(fmt), | |
] | |
}; | |
{ | |
#[doc(hidden)] | |
const ARR_LEN: usize = ::const_format::pmr::PArgument::calc_len( | |
CONCATP_NHPMWYD3NJA, | |
); | |
#[doc(hidden)] | |
const CONCAT_ARR: &::const_format::pmr::LenAndArray< | |
[u8; ARR_LEN], | |
> = &::const_format::pmr::__priv_concatenate( | |
CONCATP_NHPMWYD3NJA, | |
); | |
#[doc(hidden)] | |
#[allow(clippy::transmute_ptr_to_ptr)] | |
const CONCAT_STR: &str = unsafe { | |
let slice = ::const_format::pmr::transmute::< | |
&[u8; ARR_LEN], | |
&[u8; CONCAT_ARR.len], | |
>(&CONCAT_ARR.array); | |
{ | |
let bytes: &'static [::const_format::pmr::u8] = slice; | |
let string: &'static ::const_format::pmr::str = { | |
::const_format::__hidden_utils::PtrToRef { | |
ptr: bytes as *const [::const_format::pmr::u8] as *const str, | |
} | |
.reff | |
}; | |
string | |
} | |
}; | |
CONCAT_STR | |
} | |
}) | |
}, | |
} | |
.x | |
}, | |
); | |
let __template_read = dioxus_core::Runtime::current() | |
.ok() | |
.map(|_| __template.read()); | |
let __template_read = match __template_read | |
.as_ref() | |
.map(|__template_read| __template_read.as_ref()) | |
{ | |
Some(Some(__template_read)) => &__template_read, | |
_ => __original_template(), | |
}; | |
let mut __dynamic_literal_pool = dioxus_core::internal::DynamicLiteralPool::new( | |
::alloc::vec::Vec::new(), | |
); | |
let mut __dynamic_value_pool = dioxus_core::internal::DynamicValuePool::new( | |
<[_]>::into_vec( | |
#[rustc_box] | |
::alloc::boxed::Box::new([ | |
{ | |
let ___nodes = (row) | |
.into_iter() | |
.map(|column| { | |
dioxus_core::Element::Ok({ | |
#[cfg(debug_assertions)] | |
{ | |
static __ORIGINAL_TEMPLATE: ::std::sync::OnceLock< | |
dioxus_core::internal::HotReloadedTemplate, | |
> = ::std::sync::OnceLock::new(); | |
fn __original_template() -> &'static dioxus_core::internal::HotReloadedTemplate { | |
if __ORIGINAL_TEMPLATE.get().is_none() { | |
_ = __ORIGINAL_TEMPLATE | |
.set( | |
dioxus_core::internal::HotReloadedTemplate::new( | |
None, | |
<[_]>::into_vec( | |
#[rustc_box] | |
::alloc::boxed::Box::new([ | |
dioxus_core::internal::HotReloadDynamicNode::Dynamic(0usize), | |
]), | |
), | |
::alloc::vec::Vec::new(), | |
::alloc::vec::Vec::new(), | |
&[ | |
{ | |
dioxus_core::TemplateNode::Element { | |
tag: dioxus_elements::elements::code::TAG_NAME, | |
namespace: dioxus_elements::code::NAME_SPACE, | |
attrs: &[], | |
children: &[ | |
dioxus_core::TemplateNode::Dynamic { | |
id: 0usize, | |
}, | |
], | |
} | |
}, | |
], | |
), | |
); | |
} | |
__ORIGINAL_TEMPLATE.get().unwrap() | |
} | |
let __template = GlobalSignal::with_key( | |
|| None::<dioxus_core::internal::HotReloadedTemplate>, | |
{ | |
const PATH: &str = { | |
const ARGS_OSRCTFL4A: ::const_format::__str_methods::ReplaceInput = ::const_format::__str_methods::ReplaceInputConv( | |
"examples/clock.rs", | |
"\\\\", | |
"/", | |
) | |
.conv(); | |
{ | |
const OB: &[::const_format::pmr::u8; ARGS_OSRCTFL4A | |
.replace_length()] = &ARGS_OSRCTFL4A.replace(); | |
const OS: &::const_format::pmr::str = unsafe { | |
{ | |
let bytes: &'static [::const_format::pmr::u8] = OB; | |
let string: &'static ::const_format::pmr::str = { | |
::const_format::__hidden_utils::PtrToRef { | |
ptr: bytes as *const [::const_format::pmr::u8] as *const str, | |
} | |
.reff | |
}; | |
string | |
} | |
}; | |
OS | |
} | |
}; | |
const NORMAL: &str = { | |
const ARGS_OSRCTFL4A: ::const_format::__str_methods::ReplaceInput = ::const_format::__str_methods::ReplaceInputConv( | |
PATH, | |
'\\', | |
"/", | |
) | |
.conv(); | |
{ | |
const OB: &[::const_format::pmr::u8; ARGS_OSRCTFL4A | |
.replace_length()] = &ARGS_OSRCTFL4A.replace(); | |
const OS: &::const_format::pmr::str = unsafe { | |
{ | |
let bytes: &'static [::const_format::pmr::u8] = OB; | |
let string: &'static ::const_format::pmr::str = { | |
::const_format::__hidden_utils::PtrToRef { | |
ptr: bytes as *const [::const_format::pmr::u8] as *const str, | |
} | |
.reff | |
}; | |
string | |
} | |
}; | |
OS | |
} | |
}; | |
::const_format::pmr::__AssertStr { | |
x: { | |
use ::const_format::__cf_osRcTFl4A; | |
({ | |
#[doc(hidden)] | |
#[allow(unused_mut, non_snake_case)] | |
const CONCATP_NHPMWYD3NJA: &[__cf_osRcTFl4A::pmr::PArgument] = { | |
let fmt = __cf_osRcTFl4A::pmr::FormattingFlags::NEW; | |
&[ | |
__cf_osRcTFl4A::pmr::PConvWrapper(NORMAL) | |
.to_pargument_display(fmt), | |
__cf_osRcTFl4A::pmr::PConvWrapper(':') | |
.to_pargument_display(fmt), | |
__cf_osRcTFl4A::pmr::PConvWrapper(60u32) | |
.to_pargument_display(fmt), | |
__cf_osRcTFl4A::pmr::PConvWrapper(':') | |
.to_pargument_display(fmt), | |
__cf_osRcTFl4A::pmr::PConvWrapper(5u32) | |
.to_pargument_display(fmt), | |
__cf_osRcTFl4A::pmr::PConvWrapper(':') | |
.to_pargument_display(fmt), | |
__cf_osRcTFl4A::pmr::PConvWrapper(2usize) | |
.to_pargument_display(fmt), | |
] | |
}; | |
{ | |
#[doc(hidden)] | |
const ARR_LEN: usize = ::const_format::pmr::PArgument::calc_len( | |
CONCATP_NHPMWYD3NJA, | |
); | |
#[doc(hidden)] | |
const CONCAT_ARR: &::const_format::pmr::LenAndArray< | |
[u8; ARR_LEN], | |
> = &::const_format::pmr::__priv_concatenate( | |
CONCATP_NHPMWYD3NJA, | |
); | |
#[doc(hidden)] | |
#[allow(clippy::transmute_ptr_to_ptr)] | |
const CONCAT_STR: &str = unsafe { | |
let slice = ::const_format::pmr::transmute::< | |
&[u8; ARR_LEN], | |
&[u8; CONCAT_ARR.len], | |
>(&CONCAT_ARR.array); | |
{ | |
let bytes: &'static [::const_format::pmr::u8] = slice; | |
let string: &'static ::const_format::pmr::str = { | |
::const_format::__hidden_utils::PtrToRef { | |
ptr: bytes as *const [::const_format::pmr::u8] as *const str, | |
} | |
.reff | |
}; | |
string | |
} | |
}; | |
CONCAT_STR | |
} | |
}) | |
}, | |
} | |
.x | |
}, | |
); | |
let __template_read = dioxus_core::Runtime::current() | |
.ok() | |
.map(|_| __template.read()); | |
let __template_read = match __template_read | |
.as_ref() | |
.map(|__template_read| __template_read.as_ref()) | |
{ | |
Some(Some(__template_read)) => &__template_read, | |
_ => __original_template(), | |
}; | |
let mut __dynamic_literal_pool = dioxus_core::internal::DynamicLiteralPool::new( | |
<[_]>::into_vec( | |
#[rustc_box] | |
::alloc::boxed::Box::new([ | |
::alloc::__export::must_use({ | |
let res = ::alloc::fmt::format(format_args!("{0}", column)); | |
res | |
}) | |
.to_string(), | |
]), | |
), | |
); | |
let mut __dynamic_value_pool = dioxus_core::internal::DynamicValuePool::new( | |
<[_]>::into_vec( | |
#[rustc_box] | |
::alloc::boxed::Box::new([ | |
dioxus_core::DynamicNode::Text( | |
dioxus_core::VText::new( | |
::alloc::__export::must_use({ | |
let res = ::alloc::fmt::format(format_args!("{0}", column)); | |
res | |
}), | |
), | |
), | |
]), | |
), | |
::alloc::vec::Vec::new(), | |
__dynamic_literal_pool, | |
); | |
__dynamic_value_pool.render_with(__template_read) | |
} | |
}) | |
}) | |
.into_dyn_node(); | |
___nodes | |
}, | |
]), | |
), | |
::alloc::vec::Vec::new(), | |
__dynamic_literal_pool, | |
); | |
__dynamic_value_pool.render_with(__template_read) | |
} | |
}) | |
}) | |
.into_dyn_node(); | |
___nodes | |
}, | |
]), | |
), | |
<[_]>::into_vec( | |
#[rustc_box] | |
::alloc::boxed::Box::new([ | |
Box::new([ | |
{ | |
dioxus_elements::events::onclick::call_with_explicit_closure(move | | |
_| | |
load_more()) | |
}, | |
]), | |
]), | |
), | |
__dynamic_literal_pool, | |
); | |
__dynamic_value_pool.render_with(__template_read) | |
} | |
}) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment