pub struct SharedAdaptiveContext { /* private fields */ }Expand description
Thread-safe wrapper for AdaptiveContext.
Allows multiple operators to report cardinalities concurrently.
Implementations§
Sourcepub fn from_context(ctx: AdaptiveContext) -> Self
pub fn from_context(ctx: AdaptiveContext) -> Self
Creates from an existing context.
Sourcepub fn record_actual(&self, operator_id: &str, actual: u64)
pub fn record_actual(&self, operator_id: &str, actual: u64)
Records actual cardinality for an operator.
Sourcepub fn should_reoptimize(&self) -> bool
pub fn should_reoptimize(&self) -> bool
Checks if re-optimization should be triggered.
Sourcepub fn snapshot(&self) -> Option<AdaptiveContext>
pub fn snapshot(&self) -> Option<AdaptiveContext>
Gets a read-only snapshot of the context.
Trait Implementations§
Source§fn clone(&self) -> SharedAdaptiveContext
fn clone(&self) -> SharedAdaptiveContext
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 moreAuto Trait Implementations§
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