oa::Engine

Sole owner of OA’s local execution services. The current one-device recorder is thread-affine. Engine intentionally remains neither Send nor Sync until concurrent queue scheduling and submission synchronization are implemented and verified.

StRust public API

Declaration

pub struct Engine { /* private fields */ }
Public Rust declaration.

Public Methods

pub fn device_info(&self) -> DeviceInfo
pub fn has_graphics(&self) -> bool
pub fn create_presentation_surface<'window>( &self, window: &'window SdlWindow, ) -> Result<PresentationSurface<'window>>
pub fn checkpoint(&self) -> Result<Event>
pub fn checkpoint_timed(&self) -> Result<Event>
pub fn capture<T>( &self, capture: impl FnOnce() -> Result<T>, ) -> Result<(ExecutionPlan, T)>
pub fn submit(&self, plan: &ExecutionPlan) -> Result<Event>
pub fn submit_timed(&self, plan: &ExecutionPlan) -> Result<Event>
pub fn log( &self, level: LogLevel, component: LogComponent, text: impl AsRef<str>, ) -> Result<()>
pub fn set_log_level(&self, level: LogLevel)
pub fn log_level(&self) -> LogLevel
pub fn log_path(&self) -> Option<PathBuf>
pub fn flush_log(&self) -> Result<()>
pub fn close(self) -> Result<()>

Associated Functions

pub fn available_devices() -> Result<Vec<DeviceSummary>>
pub fn builder() -> EngineBuilder
pub fn new() -> Result<Self>
pub fn init_default() -> Result<()>
pub fn with_default<T>(use_engine: impl FnOnce(&Self) -> Result<T>) -> Result<T>

Examples

Public Method Documentation

pub fn device_info( &self ) -> DeviceInfo
No public source comment is attached to this declaration.
pub fn has_graphics( &self ) -> bool
No public source comment is attached to this declaration.
pub fn create_presentation_surface<'window>( &self, window: &'window SdlWindow ) -> Result<PresentationSurface<'window>>
No public source comment is attached to this declaration.
pub fn checkpoint( &self ) -> Result<Event>
No public source comment is attached to this declaration.
pub fn checkpoint_timed( &self ) -> Result<Event>
No public source comment is attached to this declaration.
pub fn capture<T>( &self, capture: impl FnOnce() -> Result<T>, ) -> Result<( ExecutionPlan, T )>
No public source comment is attached to this declaration.
pub fn submit( &self, plan: &ExecutionPlan ) -> Result<Event>
No public source comment is attached to this declaration.
pub fn submit_timed( &self, plan: &ExecutionPlan ) -> Result<Event>
No public source comment is attached to this declaration.
pub fn log( &self, level: LogLevel, component: LogComponent, text: impl AsRef<str>, ) -> Result<()>
No public source comment is attached to this declaration.
pub fn set_log_level( &self, level: LogLevel )
No public source comment is attached to this declaration.
pub fn log_level( &self ) -> LogLevel
No public source comment is attached to this declaration.
pub fn log_path( &self ) -> Option<PathBuf>
No public source comment is attached to this declaration.
pub fn flush_log(&self) -> Result<()>
No public source comment is attached to this declaration.
pub fn close(self) -> Result<()>
No public source comment is attached to this declaration.
pub fn available_devices() -> Result<Vec<DeviceSummary>>
No public source comment is attached to this declaration.
pub fn builder() -> EngineBuilder
No public source comment is attached to this declaration.
pub fn new() -> Result<Self>
No public source comment is attached to this declaration.
pub fn init_default() -> Result<()>
No public source comment is attached to this declaration.
pub fn with_default<T>( use_engine: impl FnOnce(&Self) -> Result<T> ) -> Result<T>
No public source comment is attached to this declaration.