Skip to main content

try_current_shape_table

Function try_current_shape_table 

Source
pub fn try_current_shape_table() -> Option<Arc<ShapeTableHandle>>
Expand description

Return the current ambient shape-table handle, or None if no scope is active.

Checks the task-local slot first, then falls back to the thread-local slot. Returning None rather than panicking is deliberate: the shape-graph free functions that consult this handle (shape_transition, shape_for_hashmap_keys, shape_property_index, drain_shape_transitions) already return Option/Vec and already degrade gracefully when no shape table is accessible.