pub enum ScriptSet {
Show 13 variants
SyncSignals,
SyncSignalsLate,
Tick,
Derivations,
Dispatch,
Timers,
Fetch,
PluginEvents,
Ready,
Fill,
DomInput,
DomState,
Frame,
}Expand description
Ordering anchors for the host-generic script systems.
Every ::<H> system ScriptPlugin registers joins one of these sets, so
an app running several hosts still has exactly one name to order against.
Order against the set, never against system::<H>: with more than one host
installed a concrete-system edge constrains that host alone and silently
leaves the others outside the one-tick dirty window.
The sets are pairwise disjoint but for one nesting:
ScriptSet::PluginEvents sits inside ScriptSet::Dispatch. Apart
from that, .after(one).before(another) never closes a cycle.
Variants§
SyncSignals
sync_signals_into_host: store -> host mirror, per host.
SyncSignalsLate
A second sync_signals_into_host pass, late in the tick, installed
only when the app runs more than one host.
A host updates its own mirror as its builtins run, so with one host the
early pass is enough. Across hosts it is not: a signal one host writes
reaches the store only when the embedder’s command applier runs, which
is after the early pass, and the store’s dirty flag is gone by the next
tick. Without this second pass the other hosts would never observe the
write at all. Ordered after the applier and before
ScriptSet::Derivations, so a derivation in one language recomputes
on the same tick a dep written in another lands.
Tick
tick_script: drain each host’s command sink onto the message bus.
Derivations
apply_derivations: the per-host derived-signal fixed point.
Dispatch
Every event dispatcher that calls into a host
(dispatch_clicks_and_doubles, dispatch_close_to_script, the
toggle / slider / menu / dialog / DnD / text-input fanout, and
fire_plugin_events, which delivers what the capabilities report).
Every member runs after ScriptSet::SyncSignals, which runs after the
control write-backs (push_*_to_signal). A handler therefore reads a
bound signal with this tick’s toggle flip, slider move, or keystroke
already in it: on_toggle sees the new state, and a Save click on the
tick after typing reads the typed text.
Timers
fire_due_timers: on_timer delivery, per host.
Fetch
fire_fetched_responses: on_fetch / on_http delivery, per host.
PluginEvents
fire_plugin_events: delivery of the handler calls plugins and
capabilities pushed, per host. Nested inside ScriptSet::Dispatch.
Ready
fire_on_ready: the once-per-mount on_ready dispatch, per host.
Registered by the embedder, not by ScriptPlugin.
Fill
fill_components: the use sites the build left for the script.
Registered by the embedder, not by ScriptPlugin.
DomInput
The DOM propagation of raw input
(crate::dom_events::deliver_input_events), once for every host.
A node.on("click", ...) listener runs here, so this set produces
script commands and every applier of them orders after it.
DomState
The DOM propagation of derived state
(crate::dom_events::deliver_state_events), once for every host. Kept
apart from ScriptSet::DomInput because it runs at the far end
of the tick, after the text edits that script commands produce;
one set covering both could not be ordered against the appliers
without a cycle.
Frame
fire_frame_callbacks: on_frame(dt) delivery, per host.
Configured after ScriptSet::Dispatch so a callback sees the input
this tick carried, and before ScriptSet::Timers so a frame and a
timer coming due together always run in that order.
Trait Implementations§
Source§impl SystemSet for ScriptSet
impl SystemSet for ScriptSet
§fn system_type(&self) -> Option<TypeId>
fn system_type(&self) -> Option<TypeId>
Some if this system set is a [SystemTypeSet].§fn is_anonymous(&self) -> bool
fn is_anonymous(&self) -> bool
true if this system set is an [AnonymousSet].impl Eq for ScriptSet
impl StructuralPartialEq for ScriptSet
Auto Trait Implementations§
impl Freeze for ScriptSet
impl RefUnwindSafe for ScriptSet
impl Send for ScriptSet
impl Sync for ScriptSet
impl Unpin for ScriptSet
impl UnsafeUnpin for ScriptSet
impl UnwindSafe for ScriptSet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> DynEq for T
impl<T> DynEq for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
§impl<S> IntoScheduleConfigs<Interned<dyn SystemSet>, ()> for Swhere
S: SystemSet,
impl<S> IntoScheduleConfigs<Interned<dyn SystemSet>, ()> for Swhere
S: SystemSet,
§fn into_configs(self) -> ScheduleConfigs<Interned<dyn SystemSet>>
fn into_configs(self) -> ScheduleConfigs<Interned<dyn SystemSet>>
ScheduleConfigs].§fn before_ignore_deferred<M>(
self,
set: impl IntoSystemSet<M>,
) -> ScheduleConfigs<T>
fn before_ignore_deferred<M>( self, set: impl IntoSystemSet<M>, ) -> ScheduleConfigs<T>
set. Read more§fn after_ignore_deferred<M>(
self,
set: impl IntoSystemSet<M>,
) -> ScheduleConfigs<T>
fn after_ignore_deferred<M>( self, set: impl IntoSystemSet<M>, ) -> ScheduleConfigs<T>
set. Read more§fn distributive_run_if<M>(
self,
condition: impl SystemCondition<M> + Clone,
) -> ScheduleConfigs<T>
fn distributive_run_if<M>( self, condition: impl SystemCondition<M> + Clone, ) -> ScheduleConfigs<T>
§fn ambiguous_with<M>(self, set: impl IntoSystemSet<M>) -> ScheduleConfigs<T>
fn ambiguous_with<M>(self, set: impl IntoSystemSet<M>) -> ScheduleConfigs<T>
set.§fn ambiguous_with_all(self) -> ScheduleConfigs<T>
fn ambiguous_with_all(self) -> ScheduleConfigs<T>
§fn chain_ignore_deferred(self) -> ScheduleConfigs<T>
fn chain_ignore_deferred(self) -> ScheduleConfigs<T>
§impl<S> IntoSystemSet<()> for Swhere
S: SystemSet,
impl<S> IntoSystemSet<()> for Swhere
S: SystemSet,
§fn into_system_set(self) -> <S as IntoSystemSet<()>>::Set
fn into_system_set(self) -> <S as IntoSystemSet<()>>::Set
SystemSet] type.