日本語

Patches and Fragment

Patches<S> is what a handler returns: new signal values and re-rendered fragments, which the browser applies in order.

Patches

ItemSummary
Patches::newAn empty batch.
signalsSets signals in the browser.
listChanges items of list signals in the browser, sending only the items that change.
all_signalsReplaces every signal with the values in signals.
elementRe-renders fragment and morphs it into the element with its id.
navigateLoads the page at url once the patches before it are applied.
push_urlShows url in the address bar as a new history entry, without loading it.
replace_urlShows url in the address bar in place of the current URL, without loading it.
to_event_streamThe batch as a Server-Sent Events body, for use without the axum feature.
value_ofThe value the batch leaves signal at, for a test of an action.
navigates_toThe URL of the first navigate in the batch, for a test.
replacesWhether the batch re-renders the fragment F, for a test.
SignalPatchNew values for one or more signals of S.
SignalPatch::andAdds the values in other. A signal present in both takes other's value.
ListPatchItem changes to list signals of S, sent without the rest of each list.
ListPatch::andAdds the changes in other, applied after the ones in self.

Fragment

ItemSummary
FragmentA part of the page that the server can re-render and replace without the rest of the page.
Fragment::IDThe element id of the fragment's root.
Fragment::renderRenders the fragment's root element.
fragmentRenders fragment with its root id set to Fragment::ID.