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: space.rs
    path of file: ./repos/ockam/implementations/rust/ockam/ockam_api/src/cloud
    
    the code of the file until where you have to start completion: use miette::IntoDiagnostic;
use minicbor::{Decode, Encode};
use serde::Serialize;

use ockam_core::api::Request;
use ockam_core::async_trait;
use ockam_node::Context;

use crate::cloud::project::{Project, ProjectsOrchestratorApi};
use crate::cloud::{ControllerClient, HasSecureClient};
use crate::nodes::InMemoryNode;

const TARGET: &str = "ockam_api::cloud::space";

#[derive(Encode, Decode, Serialize, Debug, Clone, PartialEq, Eq)]
#[rustfmt::skip]
#[cbor(map)]
pub struct Space {
    #[n(1)] pub id: String,
    #[n(2)] pub name: String,
    
    
    async fn delete_space(&self, ctx: &Context, space_id: &str) -> miette::Result<()> {
        let space_projects = self
            .cli_state
            .projects()
            .get_projects()
            .await?
            .into_iter()
            .filter(|p| p.space_id() == space_id)
            .collect::<Vec<Project>>();
        for project in space_projects {
            self.delete_project(ctx, project.space_id(), project.project_id())
                .await?;
        }

        let controller = self.create_controller().await?;
        controller.delete_space(ctx, space_id).await?;
        self.cli_state.delete_space(space_id).await?;
        Ok(())
    }