pub struct RuntimeContextBuilder { /* private fields */ }Expand description
Builder for creating RuntimeContext with fluent API
Implementations§
Source§impl RuntimeContextBuilder
impl RuntimeContextBuilder
Sourcepub fn new(
execution_id: ExecutionId,
parent: ParentLink,
tenant: TenantContext,
) -> Self
pub fn new( execution_id: ExecutionId, parent: ParentLink, tenant: TenantContext, ) -> Self
Start building a new RuntimeContext
TenantContext is REQUIRED.
Sourcepub fn trace(self, trace: TraceContext) -> Self
pub fn trace(self, trace: TraceContext) -> Self
Set trace context
Sourcepub fn session(self, session: SessionContext) -> Self
pub fn session(self, session: SessionContext) -> Self
Set session
Sourcepub fn spawn_mode(self, spawn_mode: SpawnMode) -> Self
pub fn spawn_mode(self, spawn_mode: SpawnMode) -> Self
Set spawn mode
Sourcepub fn cancellation_policy(self, policy: CancellationPolicy) -> Self
pub fn cancellation_policy(self, policy: CancellationPolicy) -> Self
Set cancellation policy
Sourcepub fn parent_execution_id(self, parent_exec_id: ExecutionId) -> Self
pub fn parent_execution_id(self, parent_exec_id: ExecutionId) -> Self
Set parent execution ID
Sourcepub fn build(self) -> RuntimeContext
pub fn build(self) -> RuntimeContext
Build the RuntimeContext
Auto Trait Implementations§
impl Freeze for RuntimeContextBuilder
impl RefUnwindSafe for RuntimeContextBuilder
impl Send for RuntimeContextBuilder
impl Sync for RuntimeContextBuilder
impl Unpin for RuntimeContextBuilder
impl UnsafeUnpin for RuntimeContextBuilder
impl UnwindSafe for RuntimeContextBuilder
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