Trait kcl_lib::engine::EngineManager
source · pub trait EngineManager: Debug + Send + Sync + 'static {
// Required methods
fn batch(&self) -> Arc<Mutex<Vec<(WebSocketRequest, SourceRange)>>>;
fn default_planes<'life0, 'async_trait>(
&'life0 self,
_source_range: SourceRange
) -> Pin<Box<dyn Future<Output = Result<DefaultPlanes, KclError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn clear_scene_post_hook<'life0, 'async_trait>(
&'life0 self,
source_range: SourceRange
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn inner_send_modeling_cmd<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
source_range: SourceRange,
cmd: WebSocketRequest,
id_to_source_range: HashMap<Uuid, SourceRange>
) -> Pin<Box<dyn Future<Output = Result<OkWebSocketResponseData, KclError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn clear_scene<'life0, 'async_trait>(
&'life0 self,
source_range: SourceRange
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn send_modeling_cmd<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
source_range: SourceRange,
cmd: ModelingCmd
) -> Pin<Box<dyn Future<Output = Result<OkWebSocketResponseData, KclError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn flush_batch<'life0, 'async_trait>(
&'life0 self,
source_range: SourceRange
) -> Pin<Box<dyn Future<Output = Result<OkWebSocketResponseData, KclError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn make_default_plane<'life0, 'async_trait>(
&'life0 self,
x_axis: Point3d,
y_axis: Point3d,
color: Option<Color>,
source_range: SourceRange
) -> Pin<Box<dyn Future<Output = Result<Uuid, KclError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn new_default_planes<'life0, 'async_trait>(
&'life0 self,
source_range: SourceRange
) -> Pin<Box<dyn Future<Output = Result<DefaultPlanes, KclError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}
Required Methods§
sourcefn batch(&self) -> Arc<Mutex<Vec<(WebSocketRequest, SourceRange)>>>
fn batch(&self) -> Arc<Mutex<Vec<(WebSocketRequest, SourceRange)>>>
Get the batch of commands to be sent to the engine.
sourcefn default_planes<'life0, 'async_trait>(
&'life0 self,
_source_range: SourceRange
) -> Pin<Box<dyn Future<Output = Result<DefaultPlanes, KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn default_planes<'life0, 'async_trait>(
&'life0 self,
_source_range: SourceRange
) -> Pin<Box<dyn Future<Output = Result<DefaultPlanes, KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the default planes.
sourcefn clear_scene_post_hook<'life0, 'async_trait>(
&'life0 self,
source_range: SourceRange
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear_scene_post_hook<'life0, 'async_trait>(
&'life0 self,
source_range: SourceRange
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Helpers to be called after clearing a scene. (These really only apply to wasm for now.
sourcefn inner_send_modeling_cmd<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
source_range: SourceRange,
cmd: WebSocketRequest,
id_to_source_range: HashMap<Uuid, SourceRange>
) -> Pin<Box<dyn Future<Output = Result<OkWebSocketResponseData, KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn inner_send_modeling_cmd<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
source_range: SourceRange,
cmd: WebSocketRequest,
id_to_source_range: HashMap<Uuid, SourceRange>
) -> Pin<Box<dyn Future<Output = Result<OkWebSocketResponseData, KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a modeling command and wait for the response message.
Provided Methods§
fn clear_scene<'life0, 'async_trait>(
&'life0 self,
source_range: SourceRange
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_modeling_cmd<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
source_range: SourceRange,
cmd: ModelingCmd
) -> Pin<Box<dyn Future<Output = Result<OkWebSocketResponseData, KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
sourcefn flush_batch<'life0, 'async_trait>(
&'life0 self,
source_range: SourceRange
) -> Pin<Box<dyn Future<Output = Result<OkWebSocketResponseData, KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn flush_batch<'life0, 'async_trait>(
&'life0 self,
source_range: SourceRange
) -> Pin<Box<dyn Future<Output = Result<OkWebSocketResponseData, KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Force flush the batch queue.