pub struct IotDataPlaneState {
pub shadows: HashMap<ShadowKey, ThingShadow>,
pub published_messages: Vec<PublishedMessage>,
pub retained_messages: HashMap<String, RetainedMessage>,
}Fields§
§shadows: HashMap<ShadowKey, ThingShadow>§published_messages: Vec<PublishedMessage>§retained_messages: HashMap<String, RetainedMessage>Implementations§
Source§impl IotDataPlaneState
impl IotDataPlaneState
pub fn get_thing_shadow( &self, thing_name: &str, shadow_name: Option<&str>, ) -> Result<&ThingShadow, IotDataPlaneError>
pub fn update_thing_shadow( &mut self, thing_name: &str, shadow_name: Option<&str>, payload: Vec<u8>, ) -> Result<&ThingShadow, IotDataPlaneError>
pub fn delete_thing_shadow( &mut self, thing_name: &str, shadow_name: Option<&str>, ) -> Result<ThingShadow, IotDataPlaneError>
pub fn list_named_shadows_for_thing(&self, thing_name: &str) -> Vec<String>
pub fn publish(&mut self, topic: &str, payload: Vec<u8>, qos: i32, retain: bool)
pub fn get_retained_message( &self, topic: &str, ) -> Result<&RetainedMessage, IotDataPlaneError>
pub fn list_retained_messages(&self) -> Vec<&RetainedMessage>
Trait Implementations§
Source§impl Debug for IotDataPlaneState
impl Debug for IotDataPlaneState
Source§impl Default for IotDataPlaneState
impl Default for IotDataPlaneState
Source§fn default() -> IotDataPlaneState
fn default() -> IotDataPlaneState
Returns the “default value” for a type. Read more
Source§impl From<&IotDataPlaneState> for IotDataPlaneStateView
impl From<&IotDataPlaneState> for IotDataPlaneStateView
Source§fn from(state: &IotDataPlaneState) -> Self
fn from(state: &IotDataPlaneState) -> Self
Converts to this type from the input type.
Source§impl From<IotDataPlaneStateView> for IotDataPlaneState
impl From<IotDataPlaneStateView> for IotDataPlaneState
Source§fn from(view: IotDataPlaneStateView) -> Self
fn from(view: IotDataPlaneStateView) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for IotDataPlaneState
impl RefUnwindSafe for IotDataPlaneState
impl Send for IotDataPlaneState
impl Sync for IotDataPlaneState
impl Unpin for IotDataPlaneState
impl UnsafeUnpin for IotDataPlaneState
impl UnwindSafe for IotDataPlaneState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.