pub fn assemble_topic(
topic_type: Topic,
thing_name: &str,
named: Option<&str>,
) -> Result<ArrayString<SHADOW_TOPIC_MAX_LENGTH>, Error>
Expand description
Assemble shadow topic string when Thing Name or Shadow Name is only known at run time.
ยงExample
use aws_iot_device_sdk::shadow::Topic::*;
use aws_iot_device_sdk::{shadow};
use arrayvec::{ArrayString, ArrayVec};
let topic = shadow::assemble_topic(shadow::Topic::Get, "chloe", None).unwrap();
assert_eq!("$aws/things/chloe/shadow/get", topic.as_str())