pub struct TelemetryClient<C: Clock, S: TcpClientStack> { /* private fields */ }
Expand description
The telemetry client for reporting telemetry data over MQTT.
Implementations§
Source§impl<C: Clock, S: TcpClientStack<Error = NetworkError> + Dns> TelemetryClient<C, S>
impl<C: Clock, S: TcpClientStack<Error = NetworkError> + Dns> TelemetryClient<C, S>
Sourcepub fn new(
mqtt: Minimq<'static, S, C, NamedBroker<S>>,
prefix: &'static str,
metadata: &'static ApplicationMetadata,
) -> Self
pub fn new( mqtt: Minimq<'static, S, C, NamedBroker<S>>, prefix: &'static str, metadata: &'static ApplicationMetadata, ) -> Self
Sourcepub fn publish_telemetry<T: Serialize>(&mut self, suffix: &str, telemetry: &T)
pub fn publish_telemetry<T: Serialize>(&mut self, suffix: &str, telemetry: &T)
pub fn publish<T: Serialize>( &mut self, topic: &str, payload: &T, ) -> Result<(), PubError<NetworkError, Error>>
Auto Trait Implementations§
impl<C, S> Freeze for TelemetryClient<C, S>
impl<C, S> RefUnwindSafe for TelemetryClient<C, S>where
S: RefUnwindSafe,
C: RefUnwindSafe,
<S as TcpClientStack>::TcpSocket: RefUnwindSafe,
<C as Clock>::T: RefUnwindSafe,
impl<C, S> Send for TelemetryClient<C, S>
impl<C, S> Sync for TelemetryClient<C, S>
impl<C, S> Unpin for TelemetryClient<C, S>
impl<C, S> !UnwindSafe for TelemetryClient<C, S>
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