pub async fn new(docker: Arc<Mutex<Docker>>) -> Result<Self, Error> {
        match docker.lock().await.ping().await {
            Ok(_) => {}
            Err(_) => return Err(Error::Docker(DockerError::Ping)),
        }

        let this = Self {
            docker,
            containers: Arc::new(Mutex::new(Vec::new())),
            debug: false,
        };

        EGGSHELLS.lock().await.push(this.clone());
        Ok(this)
    }
/// Construct a new EggShell. When dropped or when teardown() is called, all containers
/// launched through it will be reaped.
Construct a new EggShell. When dropped or when teardown() is called, all containers
launched through it will be reaped.
Construct a new EggShell . When dropped or when teardown () is called all containers launched through it will be reaped .
pub async fn new(docker: Arc<Mutex<Docker>>) -> Result<Self, Error> {
        match docker.lock().await.ping().await {
            Ok(_) => {}
            Err(_) => return Err(Error::Docker(DockerError::Ping)),
        }
        let this = Self {
            docker,
            containers: Arc::new(Mutex::new(Vec::new())),
            debug: false,
        };
        EGGSHELLS.lock().await.push(this.clone());
        Ok(this)
    }
pub async fn new ( docker : Arc < Mutex < Docker > > ) -> Result < Self , Error > { match docker . lock ( ) . await . ping ( ) . await { Ok ( _ ) => { } Err ( _ ) => return Err ( Error :: Docker ( DockerError :: Ping ) ) , } let this = Self { docker , containers : Arc :: new ( Mutex :: new ( Vec :: new ( ) ) ) , debug : false , } ; EGGSHELLS . lock ( ) . await . push ( this . clone ( ) ) ; Ok ( this ) }
Construct a new EggShell.
Construct a new EggShell .
docker
Arc<Mutex<Docker>>
docker
Arc<Mutex<Docker>>