pub fn change_context(&self, mut context: Option<Box<dyn Context + Send + Sync>>) {
        let mut lock = self
            .active_context
            .write()
            .expect("active_context is poisoned");
        swap(&mut *lock, &mut context);
        if let Some(ref new_context) = *lock {
            new_context.take_ownership(context);
        }
    }
/// change the context, giving ownership of the previous context to the new one
change the context, giving ownership of the previous context to the new one
change the context giving ownership of the previous context to the new one
pub fn change_context(&self, mut context: Option<Box<dyn Context + Send + Sync>>) {
        let mut lock = self
            .active_context
            .write()
            .expect("active_context is poisoned");
        swap(&mut *lock, &mut context);
        if let Some(ref new_context) = *lock {
            new_context.take_ownership(context);
        }
    }
pub fn change_context ( & self , mut context : Option < Box < dyn Context + Send + Sync > > ) { let mut lock = self . active_context . write ( ) . expect ( " " ) ; swap ( & mut * lock , & mut context ) ; if let Some ( ref new_context ) = * lock { new_context . take_ownership ( context ) ; } }
change the context, giving ownership of the previous context to the new one
change the context giving ownership of the previous context to the new one
&self
context
Option<Box<dyn Context + Send + Sync>>