pub struct StatementThreadContext {
pub temporal_input: TemporalInputContext,
pub cancellation: Option<CancellationToken>,
}Expand description
The temporal input a statement’s expressions read and the cancellation work inside one scalar evaluation observes. A statement enters the context it runs under for its analysis, planning and execution; work dispatched to another thread captures the dispatching thread’s context and enters it on that thread.
Fields§
§temporal_input: TemporalInputContext§cancellation: Option<CancellationToken>The running statement’s cancellation token, or None for work dispatched from outside any statement.
Implementations§
Source§impl StatementThreadContext
impl StatementThreadContext
Sourcepub fn current() -> Self
pub fn current() -> Self
Capture the invoking thread’s context for work it dispatches to another thread.
Sourcepub fn enter(&self) -> StatementThreadScope
pub fn enter(&self) -> StatementThreadScope
Run the invoking thread under this context until the returned scope drops, which restores the enclosing context.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StatementThreadContext
impl RefUnwindSafe for StatementThreadContext
impl Send for StatementThreadContext
impl Sync for StatementThreadContext
impl Unpin for StatementThreadContext
impl UnsafeUnpin for StatementThreadContext
impl UnwindSafe for StatementThreadContext
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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