pub struct ActionRegistry { /* private fields */ }Expand description
A live registry of action handles for use by typed primitives.
Maps table name to TableAction (plus the shared UnionAction
and the default-panic external-function id) and is owned by the
bridge EGraph. The state wrappers (PureState/ReadState/
WriteState/FullState) live in the egglog crate; they read
from this registry at invoke time to back name-indexed action
methods. Held by the bridge EGraph inside an Arc<RwLock<_>>.
Implementations§
Source§impl ActionRegistry
impl ActionRegistry
Sourcepub fn lookup_table(&self, name: &str) -> Option<&TableAction>
pub fn lookup_table(&self, name: &str) -> Option<&TableAction>
Look up the TableAction for a table by name, or None if
no table with that name has been registered.
Sourcepub fn table_sizes(&self, state: &ExecutionState<'_>) -> Vec<(&str, usize)>
pub fn table_sizes(&self, state: &ExecutionState<'_>) -> Vec<(&str, usize)>
Snapshot the registered table names and their current row counts.
Sourcepub fn union_action(&self) -> &UnionAction
pub fn union_action(&self) -> &UnionAction
The shared UnionAction for this EGraph’s union-find.
Sourcepub fn default_panic_id(&self) -> ExternalFunctionId
pub fn default_panic_id(&self) -> ExternalFunctionId
The default panic external function id, used by the egglog
crate’s ActionView::panic.
Trait Implementations§
Source§impl Clone for ActionRegistry
impl Clone for ActionRegistry
Source§fn clone(&self) -> ActionRegistry
fn clone(&self) -> ActionRegistry
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§
impl Freeze for ActionRegistry
impl RefUnwindSafe for ActionRegistry
impl Send for ActionRegistry
impl Sync for ActionRegistry
impl Unpin for ActionRegistry
impl UnwindSafe for ActionRegistry
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,
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