Struct azure_core::prelude::Context
source · [−]pub struct Context { /* private fields */ }
Expand description
Pipeline execution context.
Implementations
sourceimpl Context
impl Context
sourcepub fn insert_or_replace<E>(&mut self, entity: E) -> Option<Arc<E>>where
E: Send + Sync + 'static,
pub fn insert_or_replace<E>(&mut self, entity: E) -> Option<Arc<E>>where
E: Send + Sync + 'static,
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 Selfwhere
E: Send + Sync + 'static,
pub fn insert<E>(&mut self, entity: E) -> &mut Selfwhere
E: Send + Sync + 'static,
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>>where
E: Send + Sync + 'static,
pub fn remove<E>(&mut self) -> Option<Arc<E>>where
E: Send + Sync + 'static,
Removes an entity from the type map. If present, the entity will be returned.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more