pub struct ExecutionContext {
pub execution_id: ExecutionId,
pub step_id: Option<StepId>,
pub artifact_id: Option<ArtifactId>,
pub parent: Option<ParentLink>,
pub tenant_id: Option<TenantId>,
pub user_id: Option<UserId>,
}Expand description
ExecutionContext - Minimal context attached to every event
Replaces the old BaseIdHierarchy with a simpler structure.
Fields§
§execution_id: ExecutionIdRequired: The execution this event belongs to
step_id: Option<StepId>Optional: The specific step
artifact_id: Option<ArtifactId>Optional: The artifact produced
parent: Option<ParentLink>Parent linkage (causal origin)
tenant_id: Option<TenantId>Tenant context
user_id: Option<UserId>Implementations§
Source§impl ExecutionContext
impl ExecutionContext
Sourcepub fn new(execution_id: ExecutionId) -> Self
pub fn new(execution_id: ExecutionId) -> Self
Create a new ExecutionContext for an execution
Sourcepub fn with_artifact(self, artifact_id: ArtifactId) -> Self
pub fn with_artifact(self, artifact_id: ArtifactId) -> Self
Add artifact context
Sourcepub fn with_parent(self, parent: ParentLink) -> Self
pub fn with_parent(self, parent: ParentLink) -> Self
Add parent linkage
Sourcepub fn with_tenant(self, tenant_id: TenantId, user_id: Option<UserId>) -> Self
pub fn with_tenant(self, tenant_id: TenantId, user_id: Option<UserId>) -> Self
Add tenant context
Trait Implementations§
Source§impl Clone for ExecutionContext
impl Clone for ExecutionContext
Source§fn clone(&self) -> ExecutionContext
fn clone(&self) -> ExecutionContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExecutionContext
impl Debug for ExecutionContext
Source§impl<'de> Deserialize<'de> for ExecutionContext
impl<'de> Deserialize<'de> for ExecutionContext
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ExecutionContext
impl RefUnwindSafe for ExecutionContext
impl Send for ExecutionContext
impl Sync for ExecutionContext
impl Unpin for ExecutionContext
impl UnsafeUnpin for ExecutionContext
impl UnwindSafe for ExecutionContext
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