Skip to main content

ReflectTaskIntrospection

Trait ReflectTaskIntrospection 

Source
pub trait ReflectTaskIntrospection {
    // Required methods
    fn reflect_task(&self, task_id: &str) -> Option<&(dyn Reflect + 'static)>;
    fn reflect_task_mut(
        &mut self,
        task_id: &str,
    ) -> Option<&mut (dyn Reflect + 'static)>;

    // Provided methods
    fn register_reflect_types(_registry: &mut TypeRegistry) { ... }
    fn debug_state_type_path(_task_id: &str) -> Option<&'static str> { ... }
    fn with_debug_state<R>(
        &self,
        _task_id: &str,
        _f: impl FnOnce(&(dyn Reflect + 'static)) -> R,
    ) -> Option<R> { ... }
}
Expand description

Runtime task-reflect contract exposed by generated Copper applications.

Required Methods§

Source

fn reflect_task(&self, task_id: &str) -> Option<&(dyn Reflect + 'static)>

Returns a reflected immutable task instance for the given task id.

Source

fn reflect_task_mut( &mut self, task_id: &str, ) -> Option<&mut (dyn Reflect + 'static)>

Returns a reflected mutable task instance for the given task id.

Provided Methods§

Source

fn register_reflect_types(_registry: &mut TypeRegistry)

Registers reflected schema types for this mission’s app (tasks, messages, bridges).

Source

fn debug_state_type_path(_task_id: &str) -> Option<&'static str>

Returns the reflected type path used as the task’s debug-state schema.

Source

fn with_debug_state<R>( &self, _task_id: &str, _f: impl FnOnce(&(dyn Reflect + 'static)) -> R, ) -> Option<R>

Borrows the task’s current debug-state view.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§