pub struct EvalCtx<'a> {
pub lmpg: &'a Lmpg,
pub snap: QuerySnapshot,
pub is_cancelled: Option<&'a dyn Fn() -> bool>,
/* private fields */
}Expand description
Traversal-capable evaluation context. Records-perspective execution
routes through this when the where tree contains Expr::Related.
Fields§
§lmpg: &'a LmpgEngine handle used for tenant scope and store access.
snap: QuerySnapshotPinned snapshot all traversal reads resolve against.
is_cancelled: Option<&'a dyn Fn() -> bool>Cooperative cancellation probe, when the caller supplied one.
Implementations§
Source§impl<'a> EvalCtx<'a>
impl<'a> EvalCtx<'a>
Sourcepub fn new(lmpg: &'a Lmpg) -> Result<Self, QueryError>
pub fn new(lmpg: &'a Lmpg) -> Result<Self, QueryError>
Open a context pinned to the store’s current committed view.
§Errors
Propagates a rushdb_storage::StorageError if the read view cannot
be opened.
Sourcepub fn check_cancelled(&self) -> Result<(), QueryError>
pub fn check_cancelled(&self) -> Result<(), QueryError>
Poll the cancellation probe between traversal steps. A no-op when the caller supplied no probe.
§Errors
Returns QueryError::Cancelled when the probe requests a stop.
Auto Trait Implementations§
impl<'a> !Freeze for EvalCtx<'a>
impl<'a> !RefUnwindSafe for EvalCtx<'a>
impl<'a> !Send for EvalCtx<'a>
impl<'a> !Sync for EvalCtx<'a>
impl<'a> !UnwindSafe for EvalCtx<'a>
impl<'a> Unpin for EvalCtx<'a>
impl<'a> UnsafeUnpin for EvalCtx<'a>
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