pub struct IotHubModuleClient<C: ModuleEventCallback> { /* private fields */ }Implementations§
Source§impl<C: ModuleEventCallback> IotHubModuleClient<C>
impl<C: ModuleEventCallback> IotHubModuleClient<C>
pub fn create_from_environment( protocol: TransportProvider, callback: C, ) -> Result<Self, IotError>
pub fn create_from_connection_string( connection_string: &str, transport: TransportProvider, callback: C, ) -> Result<Self, IotError>
pub async fn send_event_async( &mut self, message: &IotHubMessage, ) -> Result<(), IotError>
pub async fn send_message_result( &mut self, message: &IotHubMessage, ) -> Result<IoTHubClientConfirmationResult, IotError>
pub async fn send_message( &mut self, message: &IotHubMessage, ) -> Result<IoTHubClientConfirmationResult, IotError>
pub fn get_send_status(&self) -> Result<(), IotError>
pub fn set_retry_policy( &self, retry_policy: IOTHUB_CLIENT_RETRY_POLICY, retry_timeout_limit_in_seconds: usize, ) -> Result<(), IotError>
pub fn get_retry_policy( &self, ) -> Result<(IOTHUB_CLIENT_RETRY_POLICY, usize), IotError>
pub fn get_last_message_receive_time(&self) -> Result<SystemTime, IotError>
pub fn do_work_once(&self) -> Result<(), IotError>
pub fn set_option_value<T>( &self, option_name: &str, value: &T, ) -> Result<(), IotError>
pub fn send_reported_state( &mut self, reported_state: &[u8], callback: IOTHUB_CLIENT_REPORTED_STATE_CALLBACK, ) -> Result<(), IotError>
pub async fn get_twin_async( &mut self, ) -> Result<(IotHubDeviceTwinUpdateState, Vec<u8>), IotError>
pub async fn send_event_to_output_async( &mut self, message: &IotHubMessage, output_name: &CStr, ) -> Result<IoTHubClientConfirmationResult, IotError>
pub fn device_method_invoke( &self, device_id: &str, method_name: &str, method_payload: &str, timeout: Duration, ) -> Result<MethodInvokeResponse, IotError>
pub fn module_method_invoke( &self, device_id: &str, module_id: &str, method_name: &str, method_payload: &str, timeout: c_uint, ) -> Result<MethodInvokeResponse, IotError>
pub fn send_message_disposition( &self, message: &IotHubMessage, disposition: IOTHUBMESSAGE_DISPOSITION_RESULT, ) -> Result<(), IotError>
pub async fn send_telemetry_async( &mut self, message: &IotHubMessage, ) -> Result<IoTHubClientConfirmationResult, IotError>
pub fn subscribe_to_commands( &mut self, callback: IOTHUB_CLIENT_COMMAND_CALLBACK_ASYNC, ) -> Result<(), IotError>
pub async fn send_properties_async( &mut self, properties: &[u8], ) -> Result<c_int, IotError>
pub async fn get_properties_async( &mut self, ) -> Result<(IoTHubClientPropertyPayloadType, Vec<u8>), IotError>
pub async fn get_properties_and_subscribe_to_updates_async( &mut self, ) -> Result<(IoTHubClientPropertyPayloadType, Vec<u8>), IotError>
pub fn set_option(&self, option: ModuleClientOption<'_>) -> Result<(), IotError>
Trait Implementations§
Source§impl<C: ModuleEventCallback> Drop for IotHubModuleClient<C>
impl<C: ModuleEventCallback> Drop for IotHubModuleClient<C>
impl<C: ModuleEventCallback + Send> Send for IotHubModuleClient<C>
Auto Trait Implementations§
impl<C> Freeze for IotHubModuleClient<C>where
C: Freeze,
impl<C> RefUnwindSafe for IotHubModuleClient<C>where
C: RefUnwindSafe,
impl<C> !Sync for IotHubModuleClient<C>
impl<C> Unpin for IotHubModuleClient<C>where
C: Unpin,
impl<C> UnsafeUnpin for IotHubModuleClient<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for IotHubModuleClient<C>where
C: UnwindSafe,
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