You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: encryptor_worker.rs
    path of file: ./repos/ockam/implementations/rust/ockam/ockam_identity/src/secure_channel
    
    the code of the file until where you have to start completion: use core::sync::atomic::{AtomicBool, Ordering};

use tracing::{debug, error, info, warn};
use tracing_attributes::instrument;

use ockam_core::compat::boxed::Box;
use ockam_core::compat::sync::Arc;
use ockam_core::compat::vec::Vec;
use ockam_core::errcode::{Kind, Origin};
use ockam_core::{async_trait, Decodable, Encodable, Error, Local
    
    async fn shutdown(&mut self, context: &mut Self::Context) -> Result<()> {
        if let Some(credential_retriever) = &self.credential_retriever {
            credential_retriever.unsubscribe(&self.addresses.encryptor_internal)?;
        }

        let _ = context
            .stop_worker(self.addresses.decryptor_internal.clone())
            .await;
        if self.shared_state.should_send_close.load(Ordering::Relaxed) {
            let _ = self.send_close_channel(context).await;
        }
        self.encryptor.shutdown().await
    }