You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would save a bunch of unnecessary allocations, and it is entirely safe since the state can't be modified between Renderer::render being called and the DomNode being drawn to the page. However, I don't think this is possible without ATCs, as the lifetime of the returned DomNode would be dependent upon the lifetime of the reference to the application state.
The modified Renderer trait might look something like this:
pubtraitRenderer<State>{/// Type of the rendered `DomNode`typeRendered<'a>:DomNode + 'a;/// Renders a `DomNode` given the current application statefnrender<'a>(&'aself,&'aState) -> Self::Rendered<'a>;}
The text was updated successfully, but these errors were encountered:
This would save a bunch of unnecessary allocations, and it is entirely safe since the state can't be modified between
Renderer::render
being called and theDomNode
being drawn to the page. However, I don't think this is possible without ATCs, as the lifetime of the returnedDomNode
would be dependent upon the lifetime of the reference to the application state.The modified
Renderer
trait might look something like this:The text was updated successfully, but these errors were encountered: