pub struct Context { /* private fields */ }
Expand description
Pipeline execution context.
Implementations§
source§impl Context
impl Context
sourcepub fn insert_or_replace<E>(&mut self, entity: E) -> Option<Arc<E>>
pub fn insert_or_replace<E>(&mut self, entity: E) -> Option<Arc<E>>
Inserts or replaces an entity in the type map. If an entity with the same type was displaced by the insert, it will be returned to the caller.
sourcepub fn insert<E>(&mut self, entity: E) -> &mut Self
pub fn insert<E>(&mut self, entity: E) -> &mut Self
Inserts an entity in the type map. If the an entity with the same type signature is already present it will be silently dropped. This function returns a mutable reference to the same Context so it can be chained to itself.
sourcepub fn remove<E>(&mut self) -> Option<Arc<E>>
pub fn remove<E>(&mut self) -> Option<Arc<E>>
Removes an entity from the type map. If present, the entity will be returned.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl !RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)