fn convert_from_k8(k8_topic: K8Obj<K8TopicSpec,K8TopicStatus>) -> 
            Result<KVObject<Self>,IoError> 

    {

       // metadata is mandatory
        let topic_name = &k8_topic.metadata.name;

        // spec is mandatory
        let topic_spec = create_computed_topic_spec_from_k8_spec(&k8_topic.spec);

        // topic status is optional
        let topic_status = match &k8_topic.status {
            Some(k8_status) => create_topic_status_from_k8_spec(k8_status),
            None => TopicStatus::default(),
        };

        let ctx = KvContext::default().with_ctx(k8_topic.metadata.clone());
        Ok(
            TopicKV::new( topic_name.to_owned(),topic_spec, topic_status).with_kv_ctx(ctx),
        )
    }
/// convert kubernetes objects into KV vbalue
convert kubernetes objects into KV vbalue
convert kubernetes objects into KV vbalue
fn convert_from_k8(k8_topic: K8Obj<K8TopicSpec,K8TopicStatus>) -> 
            Result<KVObject<Self>,IoError> 
    {
       // metadata is mandatory
        let topic_name = &k8_topic.metadata.name;
        // spec is mandatory
        let topic_spec = create_computed_topic_spec_from_k8_spec(&k8_topic.spec);
        // topic status is optional
        let topic_status = match &k8_topic.status {
            Some(k8_status) => create_topic_status_from_k8_spec(k8_status),
            None => TopicStatus::default(),
        };
        let ctx = KvContext::default().with_ctx(k8_topic.metadata.clone());
        Ok(
            TopicKV::new( topic_name.to_owned(),topic_spec, topic_status).with_kv_ctx(ctx),
        )
    }
fn convert_from_k8 ( k8_topic : K8Obj < K8TopicSpec , K8TopicStatus > ) -> Result < KVObject < Self > , IoError > { // metadata is mandatory let topic_name = & k8_topic . metadata . name ; // spec is mandatory let topic_spec = create_computed_topic_spec_from_k8_spec ( & k8_topic . spec ) ; // topic status is optional let topic_status = match & k8_topic . status { Some ( k8_status ) => create_topic_status_from_k8_spec ( k8_status ) , None => TopicStatus :: default ( ) , } ; let ctx = KvContext :: default ( ) . with_ctx ( k8_topic . metadata . clone ( ) ) ; Ok ( TopicKV :: new ( topic_name . to_owned ( ) , topic_spec , topic_status ) . with_kv_ctx ( ctx ) , ) }
convert kubernetes objects into KV vbalue
convert kubernetes objects into KV vbalue
k8_topic
K8Obj<K8TopicSpec,K8TopicStatus>
k8_topic
K8Obj<K8TopicSpec,K8TopicStatus>