pub fn subscribe_untyped(
        &mut self,
        topic: &str,
        topic_type: &str,
    ) -> Result<impl Stream<Item = Result<serde_json::Value>> + Unpin> {
        let msg = WrappedNativeMsgUntyped::new_from(topic_type)?;
        let subscription_handle = self.create_subscription_helper(topic, msg.ts)?;
        let (sender, receiver) = mpsc::channel::<Result<serde_json::Value>>(10);

        let ws = WrappedSubUntyped {
            rcl_handle: subscription_handle,
            topic_type: topic_type.to_string(),
            sender,
        };
        self.subs.push(Box::new(ws));
        Ok(receiver)
    }
// Its not really untyped since we know the underlying type... But we throw this info away :)
Its not really untyped since we know the underlying type... But we throw this info away :)
Its not really untyped since we know the underlying type ... But we throw this info away : )
pub fn subscribe_untyped(
        &mut self,
        topic: &str,
        topic_type: &str,
    ) -> Result<impl Stream<Item = Result<serde_json::Value>> + Unpin> {
        let msg = WrappedNativeMsgUntyped::new_from(topic_type)?;
        let subscription_handle = self.create_subscription_helper(topic, msg.ts)?;
        let (sender, receiver) = mpsc::channel::<Result<serde_json::Value>>(10);
        let ws = WrappedSubUntyped {
            rcl_handle: subscription_handle,
            topic_type: topic_type.to_string(),
            sender,
        };
        self.subs.push(Box::new(ws));
        Ok(receiver)
    }
pub fn subscribe_untyped ( & mut self , topic : & str , topic_type : & str , ) -> Result < impl Stream < Item = Result < serde_json :: Value > > + Unpin > { let msg = WrappedNativeMsgUntyped :: new_from ( topic_type ) ? ; let subscription_handle = self . create_subscription_helper ( topic , msg . ts ) ? ; let ( sender , receiver ) = mpsc :: channel :: < Result < serde_json :: Value > > ( 10 ) ; let ws = WrappedSubUntyped { rcl_handle : subscription_handle , topic_type : topic_type . to_string ( ) , sender , } ; self . subs . push ( Box :: new ( ws ) ) ; Ok ( receiver ) }
Its not really untyped since we know the underlying type...
Its not really untyped since we know the underlying type ...
&mut self
topic
&str
topic_type
&str
&mut self
topic
&str
topic_type
&str