pub struct BspContext { /* private fields */ }Expand description
Shared execution context supporting dependency injection and state mapping across AST graphs.
Implementations§
Source§impl BspContext
impl BspContext
Sourcepub fn insert<K: TypeMapKey>(&self, val: K::Value)
pub fn insert<K: TypeMapKey>(&self, val: K::Value)
Injects a shared thread-safe dependency into the context store.
Sourcepub fn get<K: TypeMapKey>(&self) -> Option<MappedRwLockReadGuard<'_, K::Value>>
pub fn get<K: TypeMapKey>(&self) -> Option<MappedRwLockReadGuard<'_, K::Value>>
Dynamically retrieves a reference-like read-guard to an injected dependency.
Trait Implementations§
Source§impl Clone for BspContext
impl Clone for BspContext
Auto Trait Implementations§
impl !RefUnwindSafe for BspContext
impl !UnwindSafe for BspContext
impl Freeze for BspContext
impl Send for BspContext
impl Sync for BspContext
impl Unpin for BspContext
impl UnsafeUnpin for BspContext
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