pub struct EngineManager { /* private fields */ }Implementations§
Source§impl EngineManager
impl EngineManager
Sourcepub fn builder() -> EngineManagerBuilder
pub fn builder() -> EngineManagerBuilder
Create an instance of EngineManager using the builder syntax
Source§impl EngineManager
impl EngineManager
pub async fn new_websocket_transport( ws: Upgraded, heartbeats: Option<u64>, ) -> Self
Sourcepub fn new_mock() -> Self
pub fn new_mock() -> Self
Mock connection that doesn’t actually connect to anything. Used for testing.
Sourcepub async fn take_responses(&self) -> IndexMap<Uuid, WebSocketResponse>
pub async fn take_responses(&self) -> IndexMap<Uuid, WebSocketResponse>
Take the responses that have accumulated so far and clear them.
pub async fn clear_scene( &self, batch_context: &EngineBatchContext, id_generator: &mut IdGenerator, source_range: SourceRange, ) -> Result<(), KclError>
Sourcepub async fn ensure_async_command_completed(
&self,
id: Uuid,
source_range: Option<SourceRange>,
) -> Result<OkWebSocketResponseData, KclError>
pub async fn ensure_async_command_completed( &self, id: Uuid, source_range: Option<SourceRange>, ) -> Result<OkWebSocketResponseData, KclError>
Ensure a specific async command has been completed.
Sourcepub async fn ensure_async_commands_completed(
&self,
batch_context: &EngineBatchContext,
) -> Result<(), KclError>
pub async fn ensure_async_commands_completed( &self, batch_context: &EngineBatchContext, ) -> Result<(), KclError>
Ensure ALL async commands have been completed.
Sourcepub async fn reapply_settings(
&self,
batch_context: &EngineBatchContext,
settings: &ExecutorSettings,
source_range: SourceRange,
id_generator: &mut IdGenerator,
grid_scale_unit: GridScaleBehavior,
) -> Result<(), KclError>
pub async fn reapply_settings( &self, batch_context: &EngineBatchContext, settings: &ExecutorSettings, source_range: SourceRange, id_generator: &mut IdGenerator, grid_scale_unit: GridScaleBehavior, ) -> Result<(), KclError>
Re-run the command to apply the settings.
pub async fn batch_modeling_cmd( &self, batch_context: &EngineBatchContext, id: Uuid, source_range: SourceRange, cmd: &ModelingCmd, ) -> Result<(), KclError>
pub async fn batch_modeling_cmds( &self, batch_context: &EngineBatchContext, source_range: SourceRange, cmds: &[ModelingCmdReq], ) -> Result<(), KclError>
Sourcepub async fn batch_end_cmd(
&self,
batch_context: &EngineBatchContext,
id: Uuid,
source_range: SourceRange,
cmd: &ModelingCmd,
) -> Result<(), KclError>
pub async fn batch_end_cmd( &self, batch_context: &EngineBatchContext, id: Uuid, source_range: SourceRange, cmd: &ModelingCmd, ) -> Result<(), KclError>
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.
Sourcepub async fn send_modeling_cmd(
&self,
batch_context: &EngineBatchContext,
id: Uuid,
source_range: SourceRange,
cmd: &ModelingCmd,
) -> Result<OkWebSocketResponseData, KclError>
pub async fn send_modeling_cmd( &self, batch_context: &EngineBatchContext, id: Uuid, source_range: SourceRange, cmd: &ModelingCmd, ) -> Result<OkWebSocketResponseData, KclError>
Send the modeling cmd and wait for the response.
Sourcepub async fn async_modeling_cmd(
&self,
id: Uuid,
source_range: SourceRange,
cmd: &ModelingCmd,
) -> Result<(), KclError>
pub async fn async_modeling_cmd( &self, id: Uuid, source_range: SourceRange, cmd: &ModelingCmd, ) -> Result<(), KclError>
Send the modeling cmd async and don’t wait for the response. Add it to our list of async commands.
Sourcepub async fn flush_batch(
&self,
batch_context: &EngineBatchContext,
batch_end: bool,
source_range: SourceRange,
) -> Result<OkWebSocketResponseData, KclError>
pub async fn flush_batch( &self, batch_context: &EngineBatchContext, batch_end: bool, source_range: SourceRange, ) -> Result<OkWebSocketResponseData, KclError>
Force flush the batch queue.
pub async fn clear_queues(&self, batch_context: &EngineBatchContext)
pub fn stats(&self) -> &EngineStats
pub fn get_default_planes(&self) -> Arc<RwLock<Option<DefaultPlanes>>> ⓘ
pub async fn get_session_data(&self) -> Option<ModelingSessionData>
pub async fn close(&self)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for EngineManager
impl !RefUnwindSafe for EngineManager
impl !UnwindSafe for EngineManager
impl Send for EngineManager
impl Sync for EngineManager
impl Unpin for EngineManager
impl UnsafeUnpin for EngineManager
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
impl<T, U> Imply<T> for U
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.