pub struct StatementThreadContext {
pub retained_rows: RetainedRowContext,
pub io: IOContext,
pub regex_cache: Option<Arc<RegexCache>>,
pub temporal_input: TemporalInputContext,
pub cancellation: Option<CancellationToken>,
}Expand description
The temporal input, cancellation and retained regex cache a statement’s expressions use. 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§
§retained_rows: RetainedRowContextSQL-invisible immutable row sources owned by this invocation, also shared by its workers.
io: IOContextPhysical I/O belongs to the invocation executing this work, including explicit absence for unrelated sessions.
regex_cache: Option<Arc<RegexCache>>The session-owned compiled-pattern allowance, or None outside a session.
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 !RefUnwindSafe for StatementThreadContext
impl !UnwindSafe for StatementThreadContext
impl Freeze for StatementThreadContext
impl Send for StatementThreadContext
impl Sync for StatementThreadContext
impl Unpin for StatementThreadContext
impl UnsafeUnpin 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
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> ⓘ
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