Struct dioxus_rsx::CallBody
source · Expand description
Fundametnally, every CallBody is a template
Fields§
§roots: Vec<BodyNode>Implementations§
source§impl CallBody
impl CallBody
sourcepub fn update_template<Ctx: HotReloadingContext>(
&self,
template: Option<CallBody>,
location: &'static str
) -> Option<Template<'static>>
pub fn update_template<Ctx: HotReloadingContext>(
&self,
template: Option<CallBody>,
location: &'static str
) -> Option<Template<'static>>
This will try to create a new template from the current body and the previous body. This will return None if the rsx has some dynamic part that has changed. This function intentionally leaks memory to create a static template. Keeping the template static allows us to simplify the core of dioxus and leaking memory in dev mode is less of an issue. the previous_location is the location of the previous template at the time the template was originally compiled.
Trait Implementations§
source§impl ToTokens for CallBody
impl ToTokens for CallBody
Serialize the same way, regardless of flavor
source§fn to_tokens(&self, out_tokens: &mut TokenStream2)
fn to_tokens(&self, out_tokens: &mut TokenStream2)
source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
Auto Trait Implementations§
impl RefUnwindSafe for CallBody
impl !Send for CallBody
impl !Sync for CallBody
impl Unpin for CallBody
impl UnwindSafe for CallBody
Blanket Implementations§
source§impl<T> Spanned for Twhere
T: Spanned + ?Sized,
impl<T> Spanned for Twhere
T: Spanned + ?Sized,
source§fn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span covering the complete contents of this syntax tree
node, or Span::call_site() if this node is empty.