pub struct MqttPinger {
pub server: String,
pub client_id: Option<String>,
pub keepalive: u16,
pub timeout: Duration,
pub version: MqttVersion,
/* private fields */
}Expand description
MQTT pinger.
Speaks plain TCP for mqtt:// (or no scheme) targets and rustls
TLS for mqtts://. Reuses zpinger’s webpki-roots default trust
store unless a caller-supplied ClientConfig is injected via
with_tls_config — same pattern as HttpPinger / WebSocketPinger.
Fields§
§server: String§client_id: Option<String>§keepalive: u16§timeout: Duration§version: MqttVersionImplementations§
Source§impl MqttPinger
impl MqttPinger
pub fn new(server: impl Into<String>) -> Self
pub fn with_client_id(self, client_id: impl Into<String>) -> Self
pub fn with_keepalive(self, keepalive: u16) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_version(self, version: MqttVersion) -> Self
pub fn with_tls_config(self, config: Arc<ClientConfig>) -> Self
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for MqttPinger
impl !UnwindSafe for MqttPinger
impl Freeze for MqttPinger
impl Send for MqttPinger
impl Sync for MqttPinger
impl Unpin for MqttPinger
impl UnsafeUnpin for MqttPinger
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request