pub struct ArtifactFreezer { /* private fields */ }Expand description
Artifact freezer for deterministic output
Implementations§
Source§impl ArtifactFreezer
impl ArtifactFreezer
Sourcepub fn new() -> ArtifactFreezer
pub fn new() -> ArtifactFreezer
Create a new artifact freezer with default directory
Sourcepub fn with_base_dir<P>(base_dir: P) -> ArtifactFreezer
pub fn with_base_dir<P>(base_dir: P) -> ArtifactFreezer
Create a new artifact freezer with custom base directory
Sourcepub async fn freeze(
&self,
request: &FreezeRequest,
) -> Result<FrozenArtifact, Error>
pub async fn freeze( &self, request: &FreezeRequest, ) -> Result<FrozenArtifact, Error>
Freeze an AI-generated artifact to deterministic format
This method converts AI-generated content (mocks, personas, scenarios, etc.) into deterministic YAML/JSON files that can be version controlled and used for reproducible testing.
Sourcepub async fn auto_freeze_if_enabled(
&self,
request: &FreezeRequest,
deterministic_config: &DeterministicModeConfig,
) -> Result<Option<FrozenArtifact>, Error>
pub async fn auto_freeze_if_enabled( &self, request: &FreezeRequest, deterministic_config: &DeterministicModeConfig, ) -> Result<Option<FrozenArtifact>, Error>
Auto-freeze an artifact if auto-freeze is enabled
This method checks the deterministic mode config and automatically freezes the artifact if auto-freeze is enabled.
Sourcepub async fn verify_frozen_artifact(
&self,
artifact: &FrozenArtifact,
) -> Result<bool, Error>
pub async fn verify_frozen_artifact( &self, artifact: &FrozenArtifact, ) -> Result<bool, Error>
Verify the integrity of a frozen artifact
Checks that the output hash matches the current content.
Sourcepub async fn freeze_batch(
&self,
requests: &[FreezeRequest],
) -> Result<Vec<FrozenArtifact>, Error>
pub async fn freeze_batch( &self, requests: &[FreezeRequest], ) -> Result<Vec<FrozenArtifact>, Error>
Freeze multiple artifacts at once
Sourcepub async fn load_frozen(
&self,
artifact_type: &str,
identifier: Option<&str>,
) -> Result<Option<FrozenArtifact>, Error>
pub async fn load_frozen( &self, artifact_type: &str, identifier: Option<&str>, ) -> Result<Option<FrozenArtifact>, Error>
Load a frozen artifact by type and identifier
In deterministic mode, this method searches for frozen artifacts matching the given type and identifier (e.g., description hash, persona ID).
Trait Implementations§
Source§impl Default for ArtifactFreezer
impl Default for ArtifactFreezer
Source§fn default() -> ArtifactFreezer
fn default() -> ArtifactFreezer
Auto Trait Implementations§
impl Freeze for ArtifactFreezer
impl RefUnwindSafe for ArtifactFreezer
impl Send for ArtifactFreezer
impl Sync for ArtifactFreezer
impl Unpin for ArtifactFreezer
impl UnsafeUnpin for ArtifactFreezer
impl UnwindSafe for ArtifactFreezer
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
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>
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>
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