Struct aws_iot_device_sdk_rust::AWSIoTAsyncClient [−][src]
pub struct AWSIoTAsyncClient { /* fields omitted */ }
Implementations
pub async fn new(
settings: AWSIoTSettings
) -> Result<(AWSIoTAsyncClient, (EventLoop, Sender<Incoming>)), ConnectionError>
pub async fn new(
settings: AWSIoTSettings
) -> Result<(AWSIoTAsyncClient, (EventLoop, Sender<Incoming>)), ConnectionError>
Create new AWSIoTAsyncClient. Input argument should be the AWSIoTSettings. Returns a tuple where the first element is the AWSIoTAsyncClient, and the second element is a new tuple with the eventloop and incoming event sender. This tuple should be sent as an argument to the async_event_loop_listener.
Subscribe to a topic.
Publish to topic.
Get an eventloop handle that can be used to interract with the eventloop. Not needed if you are only using client.publish and client.subscribe.
Get a receiver of the incoming messages. Send this to any function that wants to read the incoming messages from IoT Core.
If you want to use the Rumqttc AsyncClient and EventLoop manually, this method can be used to get the AsyncClient.