pub struct SystemGenerator { /* private fields */ }Expand description
System Generator Engine
Implementations§
Source§impl SystemGenerator
impl SystemGenerator
Sourcepub fn new(config: IntelligentBehaviorConfig) -> SystemGenerator
pub fn new(config: IntelligentBehaviorConfig) -> SystemGenerator
Create a new system generator
Sourcepub fn with_freeze_dir<P>(
config: IntelligentBehaviorConfig,
freeze_dir: P,
) -> SystemGenerator
pub fn with_freeze_dir<P>( config: IntelligentBehaviorConfig, freeze_dir: P, ) -> SystemGenerator
Create with custom artifact freezer directory
Sourcepub async fn generate(
&self,
request: &SystemGenerationRequest,
deterministic_config: Option<&DeterministicModeConfig>,
) -> Result<GeneratedSystem, Error>
pub async fn generate( &self, request: &SystemGenerationRequest, deterministic_config: Option<&DeterministicModeConfig>, ) -> Result<GeneratedSystem, Error>
Generate a complete system from natural language description
If deterministic mode is enabled with auto-freeze, artifacts are automatically frozen.
Sourcepub async fn freeze_system_artifacts(
&self,
system_id: &str,
version: &str,
artifacts: &HashMap<String, SystemArtifact>,
_deterministic_config: Option<&DeterministicModeConfig>,
) -> Result<Vec<String>, Error>
pub async fn freeze_system_artifacts( &self, system_id: &str, version: &str, artifacts: &HashMap<String, SystemArtifact>, _deterministic_config: Option<&DeterministicModeConfig>, ) -> Result<Vec<String>, Error>
Freeze system artifacts (used for manual freeze or auto-freeze)
Sourcepub async fn apply_system_design(
&self,
system: &GeneratedSystem,
deterministic_config: Option<&DeterministicModeConfig>,
artifact_ids: Option<Vec<String>>,
) -> Result<AppliedSystem, Error>
pub async fn apply_system_design( &self, system: &GeneratedSystem, deterministic_config: Option<&DeterministicModeConfig>, artifact_ids: Option<Vec<String>>, ) -> Result<AppliedSystem, Error>
Apply system design (freeze artifacts if deterministic mode requires it)
This is called when user clicks “Apply system design” button. If deterministic mode is “auto”, artifacts are already frozen. If deterministic mode is “manual”, this freezes them now.
Sourcepub async fn freeze_artifacts(
&self,
system: &GeneratedSystem,
artifact_ids: Vec<String>,
) -> Result<Vec<String>, Error>
pub async fn freeze_artifacts( &self, system: &GeneratedSystem, artifact_ids: Vec<String>, ) -> Result<Vec<String>, Error>
Manually freeze specific artifacts
Auto Trait Implementations§
impl Freeze for SystemGenerator
impl !RefUnwindSafe for SystemGenerator
impl Send for SystemGenerator
impl Sync for SystemGenerator
impl Unpin for SystemGenerator
impl UnsafeUnpin for SystemGenerator
impl !UnwindSafe for SystemGenerator
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
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 more