get_topic

Function get_topic 

Source
pub fn get_topic(
    thing_name: &str,
    api: Topic,
) -> Result<ArrayString<JOBS_TOPIC_MAX_LENGTH>, Error>
Expand description

Populate a topic string for a subscription request.

ยงExample

use aws_iot_device_sdk_embedded_rust::jobs::Topic::*;
use aws_iot_device_sdk_embedded_rust::{jobs};

let jobs = jobs::match_topic("$aws/things/chloe/jobs/notify-next").unwrap();
assert_eq!(jobs.api, jobs::Topic::NextJobChanged);
assert_eq!(jobs.id, None);