pub trait EngineManager:
Debug
+ Send
+ Sync
+ 'static {
Show 18 methods
// Required methods
fn batch(&self) -> Arc<Mutex<Vec<(WebSocketRequest, SourceRange)>>>;
fn batch_end(
&self,
) -> Arc<Mutex<IndexMap<Uuid, (WebSocketRequest, SourceRange)>>>;
fn execution_kind(&self) -> ExecutionKind;
fn replace_execution_kind(
&self,
execution_kind: ExecutionKind,
) -> ExecutionKind;
fn default_planes<'life0, 'life1, 'async_trait>(
&'life0 self,
id_generator: &'life1 mut IdGenerator,
_source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<DefaultPlanes, KclError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn clear_scene_post_hook<'life0, 'life1, 'async_trait>(
&'life0 self,
id_generator: &'life1 mut IdGenerator,
source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: '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<WebSocketResponse, KclError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn clear_scene<'life0, 'life1, 'async_trait>(
&'life0 self,
id_generator: &'life1 mut IdGenerator,
source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn batch_modeling_cmd<'life0, 'life1, 'async_trait>(
&'life0 self,
id: Uuid,
source_range: SourceRange,
cmd: &'life1 ModelingCmd,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn batch_end_cmd<'life0, 'life1, 'async_trait>(
&'life0 self,
id: Uuid,
source_range: SourceRange,
cmd: &'life1 ModelingCmd,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: '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,
batch_end: bool,
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,
plane_id: Uuid,
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, 'life1, 'async_trait>(
&'life0 self,
id_generator: &'life1 mut IdGenerator,
source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<DefaultPlanes, KclError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn parse_websocket_response(
&self,
response: WebSocketResponse,
source_range: SourceRange,
) -> Result<OkWebSocketResponseData, KclError> { ... }
fn parse_batch_responses(
&self,
id: Uuid,
id_to_source_range: HashMap<Uuid, SourceRange>,
responses: HashMap<Uuid, BatchResponse>,
) -> Result<OkWebSocketResponseData, KclError> { ... }
fn modify_grid<'life0, 'async_trait>(
&'life0 self,
hidden: bool,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn get_session_data(&self) -> Option<ModelingSessionData> { ... }
}
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 batch_end(
&self,
) -> Arc<Mutex<IndexMap<Uuid, (WebSocketRequest, SourceRange)>>>
fn batch_end( &self, ) -> Arc<Mutex<IndexMap<Uuid, (WebSocketRequest, SourceRange)>>>
Get the batch of end commands to be sent to the engine.
Sourcefn execution_kind(&self) -> ExecutionKind
fn execution_kind(&self) -> ExecutionKind
Get the current execution kind.
Sourcefn replace_execution_kind(&self, execution_kind: ExecutionKind) -> ExecutionKind
fn replace_execution_kind(&self, execution_kind: ExecutionKind) -> ExecutionKind
Replace the current execution kind with a new value and return the existing value.
Sourcefn default_planes<'life0, 'life1, 'async_trait>(
&'life0 self,
id_generator: &'life1 mut IdGenerator,
_source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<DefaultPlanes, KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn default_planes<'life0, 'life1, 'async_trait>(
&'life0 self,
id_generator: &'life1 mut IdGenerator,
_source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<DefaultPlanes, KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the default planes.
Sourcefn clear_scene_post_hook<'life0, 'life1, 'async_trait>(
&'life0 self,
id_generator: &'life1 mut IdGenerator,
source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn clear_scene_post_hook<'life0, 'life1, 'async_trait>(
&'life0 self,
id_generator: &'life1 mut IdGenerator,
source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: '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<WebSocketResponse, 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<WebSocketResponse, 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, 'life1, 'async_trait>(
&'life0 self,
id_generator: &'life1 mut IdGenerator,
source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn batch_modeling_cmd<'life0, 'life1, 'async_trait>(
&'life0 self,
id: Uuid,
source_range: SourceRange,
cmd: &'life1 ModelingCmd,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn batch_end_cmd<'life0, 'life1, 'async_trait>(
&'life0 self,
id: Uuid,
source_range: SourceRange,
cmd: &'life1 ModelingCmd,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn batch_end_cmd<'life0, 'life1, 'async_trait>(
&'life0 self,
id: Uuid,
source_range: SourceRange,
cmd: &'life1 ModelingCmd,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Add a command to the batch that needs to be executed at the very end. This for stuff like fillets or chamfers where if we execute too soon the engine will eat the ID and we can’t reference it for other commands.
Sourcefn 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 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,
Send the modeling cmd and wait for the response.
Sourcefn flush_batch<'life0, 'async_trait>(
&'life0 self,
batch_end: bool,
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,
batch_end: bool,
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.
fn make_default_plane<'life0, 'async_trait>(
&'life0 self,
plane_id: Uuid,
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, 'life1, 'async_trait>(
&'life0 self,
id_generator: &'life1 mut IdGenerator,
source_range: SourceRange,
) -> Pin<Box<dyn Future<Output = Result<DefaultPlanes, KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn parse_websocket_response( &self, response: WebSocketResponse, source_range: SourceRange, ) -> Result<OkWebSocketResponseData, KclError>
fn parse_batch_responses( &self, id: Uuid, id_to_source_range: HashMap<Uuid, SourceRange>, responses: HashMap<Uuid, BatchResponse>, ) -> Result<OkWebSocketResponseData, KclError>
fn modify_grid<'life0, 'async_trait>(
&'life0 self,
hidden: bool,
) -> Pin<Box<dyn Future<Output = Result<(), KclError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn get_session_data(&self) -> Option<ModelingSessionData>
fn get_session_data(&self) -> Option<ModelingSessionData>
Get session data, if it has been received. Returns None if the server never sent it.