Skip to main content

ScriptSet

Enum ScriptSet 

Source
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 Clone for ScriptSet

Source§

fn clone(&self) -> ScriptSet

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ScriptSet

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for ScriptSet

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for ScriptSet

Source§

fn eq(&self, other: &ScriptSet) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl SystemSet for ScriptSet
where Self: 'static + Send + Sync + Clone + Eq + Debug + Hash,

Source§

fn dyn_clone(&self) -> Box<dyn SystemSet>

Clones this SystemSet.
§

fn system_type(&self) -> Option<TypeId>

Returns Some if this system set is a [SystemTypeSet].
§

fn is_anonymous(&self) -> bool

Returns true if this system set is an [AnonymousSet].
§

fn intern(&self) -> Interned<dyn SystemSet>
where Self: Sized,

Returns an [Interned] value corresponding to self.
Source§

impl Eq for ScriptSet

Source§

impl StructuralPartialEq for ScriptSet

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> DynEq for T
where T: Any + Eq,

§

fn dyn_eq(&self, other: &(dyn DynEq + 'static)) -> bool

This method tests for self and other values to be equal. Read more
§

impl<T> DynHash for T
where T: DynEq + Hash,

§

fn dyn_hash(&self, state: &mut dyn Hasher)

Feeds this value into the given Hasher.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> IntoResult<T> for T

§

fn into_result(self) -> Result<T, RunSystemError>

Converts this type into the system output type.
§

impl<S> IntoScheduleConfigs<Interned<dyn SystemSet>, ()> for S
where S: SystemSet,

§

fn into_configs(self) -> ScheduleConfigs<Interned<dyn SystemSet>>

Convert into a [ScheduleConfigs].
§

fn in_set(self, set: impl SystemSet) -> ScheduleConfigs<T>

Add these systems to the provided set.
§

fn before<M>(self, set: impl IntoSystemSet<M>) -> ScheduleConfigs<T>

Runs before all systems in set. If self has any systems that produce Commands or other Deferred operations, all systems in set will see their effect. Read more
§

fn after<M>(self, set: impl IntoSystemSet<M>) -> ScheduleConfigs<T>

Run after all systems in set. If set has any systems that produce Commands or other Deferred operations, all systems in self will see their effect. Read more
§

fn before_ignore_deferred<M>( self, set: impl IntoSystemSet<M>, ) -> ScheduleConfigs<T>

Run before all systems in set. Read more
§

fn after_ignore_deferred<M>( self, set: impl IntoSystemSet<M>, ) -> ScheduleConfigs<T>

Run after all systems in set. Read more
§

fn distributive_run_if<M>( self, condition: impl SystemCondition<M> + Clone, ) -> ScheduleConfigs<T>

Add a run condition to each contained system. Read more
§

fn run_if<M>(self, condition: impl SystemCondition<M>) -> ScheduleConfigs<T>

Run the systems only if the [SystemCondition] is true. Read more
§

fn ambiguous_with<M>(self, set: impl IntoSystemSet<M>) -> ScheduleConfigs<T>

Suppress warnings and errors that would result from these systems having ambiguities (conflicting access but indeterminate order) with systems in set.
§

fn ambiguous_with_all(self) -> ScheduleConfigs<T>

Suppress warnings and errors that would result from these systems having ambiguities (conflicting access but indeterminate order) with any other system.
§

fn chain(self) -> ScheduleConfigs<T>

Treat this collection as a sequence of systems. Read more
§

fn chain_ignore_deferred(self) -> ScheduleConfigs<T>

Treat this collection as a sequence of systems. Read more
§

impl<S> IntoSystemSet<()> for S
where S: SystemSet,

§

type Set = S

The type of [SystemSet] this instance converts into.
§

fn into_system_set(self) -> <S as IntoSystemSet<()>>::Set

Converts this instance to its associated [SystemSet] type.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ConditionalSend for T
where T: Send,