pub struct ExecutionContext { /* private fields */ }Expand description
Execution context for evaluating expressions
Implementations§
Source§impl ExecutionContext
impl ExecutionContext
Sourcepub fn get_current_id(&self) -> Result<String>
pub fn get_current_id(&self) -> Result<String>
Get the current ID (owned string)
Sourcepub fn get_current_timeframe(&self) -> Result<Timeframe>
pub fn get_current_timeframe(&self) -> Result<Timeframe>
Get the current timeframe
Sourcepub fn set_current_timeframe(&mut self, timeframe: Timeframe) -> Result<()>
pub fn set_current_timeframe(&mut self, timeframe: Timeframe) -> Result<()>
Set the current timeframe
Sourcepub fn update_data(&mut self, data: &DataFrame)
pub fn update_data(&mut self, data: &DataFrame)
Update ID and timeframe from a DataFrame
Sourcepub fn get_date_range(&self) -> Option<(DateTime<Utc>, DateTime<Utc>)>
pub fn get_date_range(&self) -> Option<(DateTime<Utc>, DateTime<Utc>)>
Get the loaded date range (if any) as native DateTime values
Sourcepub fn set_date_range(&mut self, start: DateTime<Utc>, end: DateTime<Utc>)
pub fn set_date_range(&mut self, start: DateTime<Utc>, end: DateTime<Utc>)
Set the date range for data loading with native DateTime values
Sourcepub fn set_date_range_parsed(&mut self, start: &str, end: &str) -> Result<()>
pub fn set_date_range_parsed(&mut self, start: &str, end: &str) -> Result<()>
Set the date range by parsing ISO8601 strings
Accepts common date formats:
- ISO8601: “2024-01-01T00:00:00Z”
- Date only: “2024-01-01” (assumes start of day UTC)
Sourcepub fn set_reference_datetime(&mut self, datetime: DateTime<Utc>)
pub fn set_reference_datetime(&mut self, datetime: DateTime<Utc>)
Set the reference datetime for row indexing
Sourcepub fn get_reference_datetime(&self) -> Option<DateTime<Utc>>
pub fn get_reference_datetime(&self) -> Option<DateTime<Utc>>
Get the reference datetime
Sourcepub fn sync_to_reference_datetime(&mut self) -> Result<()>
pub fn sync_to_reference_datetime(&mut self) -> Result<()>
Update current row to match reference datetime
Sourcepub fn set_data_access_mode(&mut self, mode: DataAccessMode, strict: bool)
pub fn set_data_access_mode(&mut self, mode: DataAccessMode, strict: bool)
Set the data access mode for future data validation
Sourcepub fn lookahead_guard(&self) -> Option<&LookAheadGuard>
pub fn lookahead_guard(&self) -> Option<&LookAheadGuard>
Get the look-ahead guard
Source§impl ExecutionContext
impl ExecutionContext
Sourcepub fn set_current_row(&mut self, index: usize) -> Result<()>
pub fn set_current_row(&mut self, index: usize) -> Result<()>
Set the current data row index
Sourcepub fn current_row_index(&self) -> usize
pub fn current_row_index(&self) -> usize
Get the current data row index
Sourcepub fn get_current_row_index(&self) -> usize
pub fn get_current_row_index(&self) -> usize
Get the current data row index (alias for compatibility)
Sourcepub fn get_row_timestamp(&self, index: usize) -> Result<i64>
pub fn get_row_timestamp(&self, index: usize) -> Result<i64>
Get timestamp for a row index
Sourcepub fn get_row(&mut self, relative_index: i32) -> Result<RowValue>
pub fn get_row(&mut self, relative_index: i32) -> Result<RowValue>
Get a data row by relative index
Sourcepub fn get_row_range(&mut self, start: i32, end: i32) -> Result<Vec<RowValue>>
pub fn get_row_range(&mut self, start: i32, end: i32) -> Result<Vec<RowValue>>
Get data rows in a range
Sourcepub fn get_row_with_timeframe(
&mut self,
index: i32,
timeframe: &Timeframe,
) -> Result<RowValue>
pub fn get_row_with_timeframe( &mut self, index: i32, timeframe: &Timeframe, ) -> Result<RowValue>
Get a data row with explicit timeframe
Sourcepub fn get_row_range_with_timeframe(
&mut self,
start: i32,
end: i32,
timeframe: &Timeframe,
) -> Result<Vec<RowValue>>
pub fn get_row_range_with_timeframe( &mut self, start: i32, end: i32, timeframe: &Timeframe, ) -> Result<Vec<RowValue>>
Get data rows in a range with explicit timeframe
Sourcepub fn get_row_relative_to_reference(
&mut self,
relative_index: i32,
) -> Result<RowValue>
pub fn get_row_relative_to_reference( &mut self, relative_index: i32, ) -> Result<RowValue>
Get a data row relative to the reference datetime
Sourcepub fn get_row_range_relative_to_reference(
&mut self,
start: i32,
end: i32,
) -> Result<Vec<RowValue>>
pub fn get_row_range_relative_to_reference( &mut self, start: i32, end: i32, ) -> Result<Vec<RowValue>>
Get data rows in a range relative to the reference datetime
Sourcepub fn get_all_rows(&mut self) -> Result<Vec<RowValue>>
pub fn get_all_rows(&mut self) -> Result<Vec<RowValue>>
Get all rows for the current identifier and timeframe
Source§impl ExecutionContext
impl ExecutionContext
Sourcepub async fn prefetch_data(&mut self, queries: Vec<DataQuery>) -> Result<()>
pub async fn prefetch_data(&mut self, queries: Vec<DataQuery>) -> Result<()>
Prefetch data before execution (Phase 6)
This async method loads all required data concurrently and populates the cache. Must be called before execution starts.
§Arguments
queries- List of DataQuery objects specifying what data to load
§Example
let queries = vec![
DataQuery::new("AAPL", Timeframe::d1()).limit(1000),
];
ctx.prefetch_data(queries).await?;Sourcepub fn start_live_feed(&mut self) -> Result<()>
pub fn start_live_feed(&mut self) -> Result<()>
Start live data feed (Phase 6)
Subscribes to live bar updates for the current symbol/timeframe. New bars will be appended to the live buffer as they arrive.
Sourcepub fn stop_live_feed(&mut self) -> Result<()>
pub fn stop_live_feed(&mut self) -> Result<()>
Stop live data feed (Phase 6)
Sourcepub fn has_data_cache(&self) -> bool
pub fn has_data_cache(&self) -> bool
Check if using async data cache (Phase 6)
Sourcepub fn data_cache(&self) -> Option<&DataCache>
pub fn data_cache(&self) -> Option<&DataCache>
Get reference to data cache (Phase 8)
Sourcepub fn async_provider(&self) -> Option<SharedAsyncProvider>
pub fn async_provider(&self) -> Option<SharedAsyncProvider>
Get async data provider (Phase 7)
Returns the AsyncDataProvider from the data cache if available. This is used for constructing TableRef and other lazy data references.
Sourcepub fn register_provider(&self, name: &str, provider: SharedAsyncProvider)
pub fn register_provider(&self, name: &str, provider: SharedAsyncProvider)
Register a data provider (Phase 8)
Registers a named provider in the registry.
Sourcepub fn get_provider(&self, name: &str) -> Result<SharedAsyncProvider>
pub fn get_provider(&self, name: &str) -> Result<SharedAsyncProvider>
Get provider by name (Phase 8)
Sourcepub fn get_default_provider(&self) -> Result<SharedAsyncProvider>
pub fn get_default_provider(&self) -> Result<SharedAsyncProvider>
Get default provider (Phase 8)
Sourcepub fn set_default_provider(&self, name: &str) -> Result<()>
pub fn set_default_provider(&self, name: &str) -> Result<()>
Set default provider (Phase 8)
Sourcepub fn register_type_mapping(&self, type_name: &str, mapping: TypeMapping)
pub fn register_type_mapping(&self, type_name: &str, mapping: TypeMapping)
Register a type mapping (Phase 8)
Registers a type mapping that defines the expected DataFrame structure.
Sourcepub fn get_type_mapping(&self, type_name: &str) -> Result<TypeMapping>
pub fn get_type_mapping(&self, type_name: &str) -> Result<TypeMapping>
Get type mapping (Phase 8)
Retrieves the type mapping for validation.
Sourcepub fn has_type_mapping(&self, type_name: &str) -> bool
pub fn has_type_mapping(&self, type_name: &str) -> bool
Check if type mapping exists (Phase 8)
Sourcepub fn load_extension(
&self,
path: &Path,
config: &Value,
) -> Result<LoadedExtension>
pub fn load_extension( &self, path: &Path, config: &Value, ) -> Result<LoadedExtension>
Load a data source extension from a shared library
§Arguments
path- Path to the extension shared library (.so, .dll, .dylib)config- Configuration value for the extension
Sourcepub fn unload_extension(&self, name: &str) -> bool
pub fn unload_extension(&self, name: &str) -> bool
Unload an extension by name
Sourcepub fn list_extensions(&self) -> Vec<String>
pub fn list_extensions(&self) -> Vec<String>
List all loaded extension names
Sourcepub fn get_extension_query_schema(
&self,
name: &str,
) -> Option<ParsedQuerySchema>
pub fn get_extension_query_schema( &self, name: &str, ) -> Option<ParsedQuerySchema>
Get query schema for an extension (for LSP autocomplete)
Sourcepub fn get_extension_output_schema(
&self,
name: &str,
) -> Option<ParsedOutputSchema>
pub fn get_extension_output_schema( &self, name: &str, ) -> Option<ParsedOutputSchema>
Get output schema for an extension (for LSP autocomplete)
Sourcepub fn get_extension(&self, name: &str) -> Option<Arc<ExtensionDataSource>>
pub fn get_extension(&self, name: &str) -> Option<Arc<ExtensionDataSource>>
Get an extension data source by name
Sourcepub fn get_extension_module_schema(
&self,
module_name: &str,
) -> Option<ParsedModuleSchema>
pub fn get_extension_module_schema( &self, module_name: &str, ) -> Option<ParsedModuleSchema>
Get extension module schema by module namespace.
Sourcepub fn get_language_runtime(
&self,
language_id: &str,
) -> Option<Arc<PluginLanguageRuntime>>
pub fn get_language_runtime( &self, language_id: &str, ) -> Option<Arc<PluginLanguageRuntime>>
Get a language runtime by its language identifier (e.g., “python”).
Sourcepub fn language_runtimes(&self) -> HashMap<String, Arc<PluginLanguageRuntime>>
pub fn language_runtimes(&self) -> HashMap<String, Arc<PluginLanguageRuntime>>
Return all loaded language runtimes, keyed by language identifier.
Sourcepub fn module_exports_from_extensions(&self) -> Vec<ModuleExports>
pub fn module_exports_from_extensions(&self) -> Vec<ModuleExports>
Build VM extension modules from loaded extension module capabilities.
Sourcepub fn invoke_extension_module_nb(
&self,
module_name: &str,
function: &str,
args: &[ValueWord],
) -> Result<ValueWord>
pub fn invoke_extension_module_nb( &self, module_name: &str, function: &str, args: &[ValueWord], ) -> Result<ValueWord>
Invoke one loaded module export via module namespace.
Sourcepub fn invoke_extension_module_wire(
&self,
module_name: &str,
function: &str,
args: &[WireValue],
) -> Result<WireValue>
pub fn invoke_extension_module_wire( &self, module_name: &str, function: &str, args: &[WireValue], ) -> Result<WireValue>
Invoke one loaded module export via module namespace.
Sourcepub fn data_load_mode(&self) -> DataLoadMode
pub fn data_load_mode(&self) -> DataLoadMode
Get current data load mode (Phase 8)
Sourcepub fn set_data_load_mode(&mut self, mode: DataLoadMode)
pub fn set_data_load_mode(&mut self, mode: DataLoadMode)
Set data load mode (Phase 8)
Sourcepub fn is_repl_mode(&self) -> bool
pub fn is_repl_mode(&self) -> bool
Check if in REPL mode (sync loading allowed)
Source§impl ExecutionContext
impl ExecutionContext
Sourcepub fn register_annotation(&mut self, def: AnnotationDef)
pub fn register_annotation(&mut self, def: AnnotationDef)
Register an annotation definition
Annotation definitions are stored and used to dispatch lifecycle hooks when functions with those annotations are registered.
Sourcepub fn annotation_context(&self) -> &AnnotationContext
pub fn annotation_context(&self) -> &AnnotationContext
Get the annotation context (for lifecycle hooks)
Sourcepub fn annotation_context_mut(&mut self) -> &mut AnnotationContext
pub fn annotation_context_mut(&mut self) -> &mut AnnotationContext
Get mutable annotation context (for lifecycle hooks)
Sourcepub fn register_function(&mut self, function: FunctionDef)
pub fn register_function(&mut self, function: FunctionDef)
Register a user-defined function
This dispatches on_define lifecycle hooks for all annotations on the function.
Sourcepub fn lookup_pattern(&self, name: &str) -> Result<&Closure>
pub fn lookup_pattern(&self, name: &str) -> Result<&Closure>
Look up a pattern by name from the pattern registry
Returns an error with a helpful message if the pattern is not found.
Sourcepub fn type_method_registry(&self) -> &Arc<TypeMethodRegistry>
pub fn type_method_registry(&self) -> &Arc<TypeMethodRegistry>
Get the type method registry
Sourcepub fn type_schema_registry(&self) -> &Arc<TypeSchemaRegistry>
pub fn type_schema_registry(&self) -> &Arc<TypeSchemaRegistry>
Get the type schema registry for JIT type specialization
Sourcepub fn register_enum(&mut self, enum_def: EnumDef)
pub fn register_enum(&mut self, enum_def: EnumDef)
Register an enum definition
This enables sum type support by tracking which enums exist and their variants.
Called during semantic analysis when processing enum declarations.
Sourcepub fn lookup_enum(&self, name: &str) -> Option<&EnumDef>
pub fn lookup_enum(&self, name: &str) -> Option<&EnumDef>
Look up an enum definition by name
Sourcepub fn enum_registry(&self) -> &EnumRegistry
pub fn enum_registry(&self) -> &EnumRegistry
Get the enum registry (for advanced queries)
Source§impl ExecutionContext
impl ExecutionContext
Sourcepub fn push_scope(&mut self)
pub fn push_scope(&mut self)
Push a new variable scope (for function calls)
Sourcepub fn reset_for_new_execution(&mut self)
pub fn reset_for_new_execution(&mut self)
Reset for new execution (Interpreter mode)
Clears script-level variables while preserving:
- Data cache (loaded instruments)
- Registered functions (from stdlib)
- Data providers
- Module exports
This allows re-execution of code with the same variable names without “Variable already declared” errors.
Sourcepub fn fork_for_parallel(&self) -> Self
pub fn fork_for_parallel(&self) -> Self
Create a fresh context for parallel execution that shares Arc-wrapped resources but has independent mutable state (variables, position manager, caches)
Source§impl ExecutionContext
impl ExecutionContext
Sourcepub fn set_variable(&mut self, name: &str, value: ValueWord) -> Result<()>
pub fn set_variable(&mut self, name: &str, value: ValueWord) -> Result<()>
Set a variable value (for simple assignment without declaration)
Sourcepub fn set_variable_nb(&mut self, name: &str, value: ValueWord) -> Result<()>
pub fn set_variable_nb(&mut self, name: &str, value: ValueWord) -> Result<()>
Set a variable value from ValueWord (avoids ValueWord conversion)
Sourcepub fn get_variable(&self, name: &str) -> Result<Option<ValueWord>>
pub fn get_variable(&self, name: &str) -> Result<Option<ValueWord>>
Get a variable value as ValueWord
Sourcepub fn get_variable_nb(&self, name: &str) -> Result<Option<ValueWord>>
pub fn get_variable_nb(&self, name: &str) -> Result<Option<ValueWord>>
Get a variable value as ValueWord (avoids ValueWord materialization)
Sourcepub fn declare_variable(
&mut self,
name: &str,
kind: VarKind,
value: Option<ValueWord>,
) -> Result<()>
pub fn declare_variable( &mut self, name: &str, kind: VarKind, value: Option<ValueWord>, ) -> Result<()>
Declare a new variable (with let, var, const)
Sourcepub fn declare_variable_with_format(
&mut self,
name: &str,
kind: VarKind,
value: Option<ValueWord>,
format_hint: Option<String>,
format_overrides: Option<HashMap<String, ValueWord>>,
) -> Result<()>
pub fn declare_variable_with_format( &mut self, name: &str, kind: VarKind, value: Option<ValueWord>, format_hint: Option<String>, format_overrides: Option<HashMap<String, ValueWord>>, ) -> Result<()>
Declare a new variable with format hint and parameter overrides
This is the full version that supports type aliases with meta parameter overrides,
e.g., type Percent4 = Percent { decimals: 4 } would store:
- format_hint: Some(“Percent”)
- format_overrides: Some({ “decimals”: 4 })
Sourcepub fn get_variable_format_hint(&self, name: &str) -> Option<String>
pub fn get_variable_format_hint(&self, name: &str) -> Option<String>
Get the format hint for a variable (if any)
Sourcepub fn get_variable_format_overrides(
&self,
name: &str,
) -> Option<HashMap<String, ValueWord>>
pub fn get_variable_format_overrides( &self, name: &str, ) -> Option<HashMap<String, ValueWord>>
Get the format overrides for a variable (if any)
Returns parameter overrides from type alias, e.g., { “decimals”: 4 }
for a variable declared as let x: Percent4 where type Percent4 = Percent { decimals: 4 }
Sourcepub fn get_variable_format_info(
&self,
name: &str,
) -> (Option<String>, Option<HashMap<String, ValueWord>>)
pub fn get_variable_format_info( &self, name: &str, ) -> (Option<String>, Option<HashMap<String, ValueWord>>)
Get both format hint and overrides for a variable
Sourcepub fn declare_pattern(
&mut self,
pattern: &DestructurePattern,
kind: VarKind,
value: ValueWord,
) -> Result<()>
pub fn declare_pattern( &mut self, pattern: &DestructurePattern, kind: VarKind, value: ValueWord, ) -> Result<()>
Declare variables matching a pattern
Sourcepub fn set_pattern(
&mut self,
pattern: &DestructurePattern,
value: ValueWord,
) -> Result<()>
pub fn set_pattern( &mut self, pattern: &DestructurePattern, value: ValueWord, ) -> Result<()>
Set variables matching a pattern (for assignments)
Sourcepub fn get_all_variable_names(&self) -> Vec<String>
pub fn get_all_variable_names(&self) -> Vec<String>
Get all variable names currently in scope
Sourcepub fn get_variable_kind(&self, name: &str) -> Option<VarKind>
pub fn get_variable_kind(&self, name: &str) -> Option<VarKind>
Get the kind of a variable (let, var, const)
Sourcepub fn root_scope_binding_names(&self) -> Vec<String>
pub fn root_scope_binding_names(&self) -> Vec<String>
Get all root-scope binding names (from the outermost scope).
This is useful for REPL persistence where we need to inform the bytecode compiler about bindings from previous sessions.
Source§impl ExecutionContext
impl ExecutionContext
Sourcepub fn new_with_registry(
data: &DataFrame,
type_method_registry: Arc<TypeMethodRegistry>,
) -> Self
pub fn new_with_registry( data: &DataFrame, type_method_registry: Arc<TypeMethodRegistry>, ) -> Self
Create a new execution context with shared type method registry
Sourcepub fn new_empty_with_registry(
type_method_registry: Arc<TypeMethodRegistry>,
) -> Self
pub fn new_empty_with_registry( type_method_registry: Arc<TypeMethodRegistry>, ) -> Self
Create a new execution context without market data with shared registry
Sourcepub fn with_data_provider_and_registry(
data_provider: Arc<dyn Any + Send + Sync>,
type_method_registry: Arc<TypeMethodRegistry>,
) -> Self
pub fn with_data_provider_and_registry( data_provider: Arc<dyn Any + Send + Sync>, type_method_registry: Arc<TypeMethodRegistry>, ) -> Self
Create a new execution context with DuckDB provider and shared registry
Sourcepub fn with_data_provider(data_provider: Arc<dyn Any + Send + Sync>) -> Self
pub fn with_data_provider(data_provider: Arc<dyn Any + Send + Sync>) -> Self
Create a new execution context with DuckDB provider
Sourcepub fn with_async_provider(
provider: SharedAsyncProvider,
runtime: Handle,
) -> Self
pub fn with_async_provider( provider: SharedAsyncProvider, runtime: Handle, ) -> Self
Create with async data provider (Phase 6)
This constructor sets up ExecutionContext with a DataCache for async data loading.
Call prefetch_data() before executing to populate the cache.
Sourcepub fn set_output_adapter(&mut self, adapter: Box<dyn OutputAdapter>)
pub fn set_output_adapter(&mut self, adapter: Box<dyn OutputAdapter>)
Set the output adapter for print() handling
Sourcepub fn output_adapter_mut(&mut self) -> &mut Box<dyn OutputAdapter>
pub fn output_adapter_mut(&mut self) -> &mut Box<dyn OutputAdapter>
Get mutable reference to output adapter
Sourcepub fn metadata_registry(&self) -> &Arc<MetadataRegistry>
pub fn metadata_registry(&self) -> &Arc<MetadataRegistry>
Get the metadata registry
Sourcepub fn register_type_alias(
&mut self,
alias_name: &str,
base_type: &str,
overrides: Option<HashMap<String, ValueWord>>,
)
pub fn register_type_alias( &mut self, alias_name: &str, base_type: &str, overrides: Option<HashMap<String, ValueWord>>, )
Register a type alias for runtime meta resolution
Used when loading stdlib to make type aliases available for formatting.
Example: type Percent4 = Percent { decimals: 4 }
Sourcepub fn lookup_type_alias(&self, name: &str) -> Option<&TypeAliasRuntimeEntry>
pub fn lookup_type_alias(&self, name: &str) -> Option<&TypeAliasRuntimeEntry>
Look up a type alias
Returns the base type name and any parameter overrides.
Sourcepub fn resolve_type_for_format(
&self,
type_name: &str,
) -> (String, Option<HashMap<String, ValueWord>>)
pub fn resolve_type_for_format( &self, type_name: &str, ) -> (String, Option<HashMap<String, ValueWord>>)
Resolve a type name, following aliases if needed
If the type is an alias, returns (base_type, Some(overrides)) If not an alias, returns (type_name, None)
Sourcepub fn snapshot(&self, store: &SnapshotStore) -> Result<ContextSnapshot>
pub fn snapshot(&self, store: &SnapshotStore) -> Result<ContextSnapshot>
Create a serializable snapshot of the dynamic execution state.
Sourcepub fn restore_from_snapshot(
&mut self,
snapshot: ContextSnapshot,
store: &SnapshotStore,
) -> Result<()>
pub fn restore_from_snapshot( &mut self, snapshot: ContextSnapshot, store: &SnapshotStore, ) -> Result<()>
Restore execution state from a snapshot.
Sourcepub fn set_event_queue(&mut self, queue: SharedEventQueue)
pub fn set_event_queue(&mut self, queue: SharedEventQueue)
Set indicator cache Set the event queue for async operations
Sourcepub fn event_queue(&self) -> Option<&SharedEventQueue>
pub fn event_queue(&self) -> Option<&SharedEventQueue>
Get the event queue
Sourcepub fn event_queue_mut(&mut self) -> Option<&mut SharedEventQueue>
pub fn event_queue_mut(&mut self) -> Option<&mut SharedEventQueue>
Get mutable reference to event queue
Sourcepub fn set_suspension_state(&mut self, state: SuspensionState)
pub fn set_suspension_state(&mut self, state: SuspensionState)
Set suspension state (called when yielding/suspending)
Sourcepub fn suspension_state(&self) -> Option<&SuspensionState>
pub fn suspension_state(&self) -> Option<&SuspensionState>
Get suspension state
Sourcepub fn clear_suspension_state(&mut self) -> Option<SuspensionState>
pub fn clear_suspension_state(&mut self) -> Option<SuspensionState>
Clear suspension state (called when resuming)
Sourcepub fn is_suspended(&self) -> bool
pub fn is_suspended(&self) -> bool
Check if execution is suspended
Sourcepub fn set_alert_pipeline(&mut self, pipeline: Arc<AlertRouter>)
pub fn set_alert_pipeline(&mut self, pipeline: Arc<AlertRouter>)
Set the alert pipeline for routing alerts to sinks
Sourcepub fn alert_pipeline(&self) -> Option<&Arc<AlertRouter>>
pub fn alert_pipeline(&self) -> Option<&Arc<AlertRouter>>
Get the alert pipeline
Sourcepub fn emit_alert(&self, alert: Alert)
pub fn emit_alert(&self, alert: Alert)
Emit an alert through the pipeline
Sourcepub fn set_progress_registry(&mut self, registry: Arc<ProgressRegistry>)
pub fn set_progress_registry(&mut self, registry: Arc<ProgressRegistry>)
Set the progress registry for monitoring load operations
Sourcepub fn progress_registry(&self) -> Option<&Arc<ProgressRegistry>>
pub fn progress_registry(&self) -> Option<&Arc<ProgressRegistry>>
Get the progress registry
Sourcepub fn set_kernel_compiler(&mut self, compiler: Arc<dyn KernelCompiler>)
pub fn set_kernel_compiler(&mut self, compiler: Arc<dyn KernelCompiler>)
Set the JIT kernel compiler for high-performance simulation.
This enables JIT compilation of simulation kernels when the state is a TypedObject.
The compiler should be an instance of shape_jit::JITCompiler wrapped in Arc.
Sourcepub fn kernel_compiler(&self) -> Option<&Arc<dyn KernelCompiler>>
pub fn kernel_compiler(&self) -> Option<&Arc<dyn KernelCompiler>>
Get the JIT kernel compiler, if set.
Trait Implementations§
Source§impl Clone for ExecutionContext
impl Clone for ExecutionContext
Source§fn clone(&self) -> ExecutionContext
fn clone(&self) -> ExecutionContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !Freeze for ExecutionContext
impl !RefUnwindSafe for ExecutionContext
impl Send for ExecutionContext
impl Sync for ExecutionContext
impl Unpin for ExecutionContext
impl UnsafeUnpin for ExecutionContext
impl !UnwindSafe for ExecutionContext
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more