pub struct Module<'a> { /* private fields */ }Expand description
A KunQuant module containing factor computation logic.
A Module represents a compiled factor computation graph with defined inputs
and outputs. It encapsulates the mathematical operations, data flow, and
optimization strategies for a specific factor or set of related factors.
§Computation Modes
Modules can be compiled for different execution modes:
- Batch Mode: Optimized for processing historical time series data
- Streaming Mode: Optimized for real-time, low-latency computation
§Lifetime Parameters
'a- The lifetime of the parent library reference
§Thread Safety
Modules are thread-safe and can be used concurrently across multiple threads. Each computation context (batch or streaming) maintains its own state.
§Memory Management
The module maintains a reference to its parent library, ensuring the library remains loaded for the module’s entire lifetime. This prevents use-after-free errors and ensures computation integrity.
Auto Trait Implementations§
impl<'a> Freeze for Module<'a>
impl<'a> RefUnwindSafe for Module<'a>
impl<'a> !Send for Module<'a>
impl<'a> !Sync for Module<'a>
impl<'a> Unpin for Module<'a>
impl<'a> UnsafeUnpin for Module<'a>
impl<'a> UnwindSafe for Module<'a>
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
Mutably borrows from an owned value. Read more