pub struct EffectIntentV1Builder { /* private fields */ }Expand description
Builder for EffectIntentV1.
Implementations§
Source§impl EffectIntentV1Builder
impl EffectIntentV1Builder
Sourcepub fn new(
effect_intent_id: EffectIntentId,
effect_class: EffectClassV1,
target_surface: impl Into<String>,
intended_outcome: impl Into<String>,
initiating_artifact_refs: Vec<String>,
required_capability_class: impl Into<String>,
allowed_scope: impl Into<String>,
blast_radius_ceiling: BlastRadiusCeilingV1,
reversibility_class: ReversibilityClassV1,
idempotency_key: impl Into<String>,
execution_window_id: EffectWindowId,
observability_obligation_refs: Vec<String>,
approval_refs: Vec<String>,
run_mode: RunModeV1,
publication_status: PublicationStatusV1,
) -> Self
pub fn new( effect_intent_id: EffectIntentId, effect_class: EffectClassV1, target_surface: impl Into<String>, intended_outcome: impl Into<String>, initiating_artifact_refs: Vec<String>, required_capability_class: impl Into<String>, allowed_scope: impl Into<String>, blast_radius_ceiling: BlastRadiusCeilingV1, reversibility_class: ReversibilityClassV1, idempotency_key: impl Into<String>, execution_window_id: EffectWindowId, observability_obligation_refs: Vec<String>, approval_refs: Vec<String>, run_mode: RunModeV1, publication_status: PublicationStatusV1, ) -> Self
Creates a builder with the required effect intent fields.
Sourcepub fn with_effect_class(self, effect_class: EffectClassV1) -> Self
pub fn with_effect_class(self, effect_class: EffectClassV1) -> Self
Set the effect class.
Sourcepub fn with_blast_radius_ceiling(self, ceiling: BlastRadiusCeilingV1) -> Self
pub fn with_blast_radius_ceiling(self, ceiling: BlastRadiusCeilingV1) -> Self
Set the blast radius ceiling.
Sourcepub fn with_reversibility_class(self, class: ReversibilityClassV1) -> Self
pub fn with_reversibility_class(self, class: ReversibilityClassV1) -> Self
Set the reversibility class.
Sourcepub fn with_run_mode(self, mode: RunModeV1) -> Self
pub fn with_run_mode(self, mode: RunModeV1) -> Self
Set the run mode.
Sourcepub fn with_publication_status(self, status: PublicationStatusV1) -> Self
pub fn with_publication_status(self, status: PublicationStatusV1) -> Self
Set the publication status.
Sourcepub fn with_approval_refs(self, refs: Vec<String>) -> Self
pub fn with_approval_refs(self, refs: Vec<String>) -> Self
Append approval references.
Sourcepub fn build(self) -> Result<EffectIntentV1, EffectRuntimeValidationError>
pub fn build(self) -> Result<EffectIntentV1, EffectRuntimeValidationError>
Builds a validated effect intent artifact.
Trait Implementations§
Source§impl Clone for EffectIntentV1Builder
impl Clone for EffectIntentV1Builder
Source§fn clone(&self) -> EffectIntentV1Builder
fn clone(&self) -> EffectIntentV1Builder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EffectIntentV1Builder
impl RefUnwindSafe for EffectIntentV1Builder
impl Send for EffectIntentV1Builder
impl Sync for EffectIntentV1Builder
impl Unpin for EffectIntentV1Builder
impl UnsafeUnpin for EffectIntentV1Builder
impl UnwindSafe for EffectIntentV1Builder
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