pub enum HostCallKind {
Spawn(MaterializedCE),
Register(MaterializedCE),
Attach {
parent: Option<ComponentId>,
child: ComponentId,
},
RegisterHandler {
scope: ComponentId,
signal_kind: SignalKind,
name: Option<String>,
handler: Value,
},
Query {
selector: String,
scope: Option<ComponentId>,
multiple: bool,
},
ReplTree {
value: Value,
max_depth: Option<usize>,
},
ReplDump {
value: Value,
},
ReplHelp,
ReplClear,
AudioClipInstance {
source: ComponentId,
start_beat: Option<f64>,
stop_beat: Option<f64>,
},
InvokeComponentMethod {
id: ComponentId,
component_type: String,
method: String,
args: Vec<Value>,
},
}Expand description
Operations the evaluator can request from the host.
Variants§
Spawn(MaterializedCE)
Spawn a component tree and return its root ComponentId.
Used for fire-and-forget root emissions (currently unused by the
evaluator — top-level CEs are still pushed as IntentValue for now).
Register(MaterializedCE)
Create the component tree in the world but do not attach it to a
parent and do not run init. Returns the root ComponentId. The
caller (typically let x = CE) holds the id as a ComponentObject
and decides where/when to splice the subtree in.
Attach
Attach a previously Registered (or Spawned) detached subtree to a
parent and run the deferred init walk. With parent: None the subtree
is initialised in place as a world root.
RegisterHandler
Register an MMS function as a scoped signal handler.
The host installs the closure and replies with HostValue::Null.
Query
Query the live ECS world. scope = None means search from the world’s
canonical roots; scope = Some(id) restricts the search to the
subtree rooted at id. multiple selects between query_all
(true, returns ComponentList) and query (false, returns the
first match as Component or Null if none).
ReplTree
ReplDump
ReplHelp
ReplClear
AudioClipInstance
Create a new AudioClipComponent that shares source’s decoded
asset but gets its own playhead (RT instance). Returns the new
component’s id, detached — mirrors Register semantics so the
caller can splice it via the usual CE-body bare-reference path.
See docs/draft/audio-clip-instance-cloning.md §3.
InvokeComponentMethod
Trait Implementations§
Source§impl Clone for HostCallKind
impl Clone for HostCallKind
Source§fn clone(&self) -> HostCallKind
fn clone(&self) -> HostCallKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for HostCallKind
impl RefUnwindSafe for HostCallKind
impl Send for HostCallKind
impl Sync for HostCallKind
impl Unpin for HostCallKind
impl UnsafeUnpin for HostCallKind
impl UnwindSafe for HostCallKind
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,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.