Skip to main content

ExecutionAlgorithmNative

Trait ExecutionAlgorithmNative 

Source
pub trait ExecutionAlgorithmNative: DataActorNative {
    // Required methods
    fn exec_algorithm_core(&self) -> &ExecutionAlgorithmCore;
    fn exec_algorithm_core_mut(&mut self) -> &mut ExecutionAlgorithmCore;

    // Provided method
    fn portfolio_rc(&self) -> Rc<RefCell<Portfolio>> { ... }
}
Expand description

Native-only access to internal execution algorithm runtime state.

Use this trait from engine, runtime, testkit, or opt-in native algorithm code when direct access to host runtime objects matters for an explicit latency-sensitive path, or when host integration code needs access below the facade API.

Do not import this trait in code intended to run through Python or the plug-in authoring surface. Native borrows, Rc<RefCell<_>>, and core references do not cross those boundaries.

Required Methods§

Source

fn exec_algorithm_core(&self) -> &ExecutionAlgorithmCore

Returns the execution algorithm core.

Source

fn exec_algorithm_core_mut(&mut self) -> &mut ExecutionAlgorithmCore

Returns the mutable execution algorithm core.

Provided Methods§

Source

fn portfolio_rc(&self) -> Rc<RefCell<Portfolio>>

Returns a clone of the reference-counted portfolio.

§Panics

Panics if the execution algorithm has not been registered.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§