pub struct PersistedShadow<'a, S: ShadowState + DeserializeOwned, M: Mqtt, D: ShadowDAO<S>> { /* private fields */ }

Implementations

Instantiate a new shadow that will be automatically persisted to NVM based on the passed DAO.

Subscribes to all the topics required for keeping a shadow in sync

Unsubscribes from all the topics required for keeping a shadow in sync

Helper function to check whether a topic name is relevant for this particular shadow.

Handle incomming publish messages from the cloud on any topics relevant for this particular shadow.

This function needs to be fed all relevant incoming MQTT payloads in order for the shadow manager to work.

Get an immutable reference to the internal local state.

Initiate a GetShadow request, updating the local state from the cloud.

Initiate an UpdateShadow request, reporting the local state to the cloud.

Update the state of the shadow.

This function will update the desired state of the shadow in the cloud, and depending on whether the state update is rejected or accepted, it will automatically update the local version after response

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.