pub trait MosquittoClientContext {
// Required methods
fn get_address(&self) -> Option<IpAddr>;
fn is_clean_session(&self) -> bool;
fn get_id(&self) -> Option<String>;
fn get_keepalive(&self) -> i32;
fn get_certificate(&self) -> Option<&[u8]>;
fn get_protocol(&self) -> MosquittoClientProtocol;
fn get_protocol_version(&self) -> MosquittoClientProtocolVersion;
fn get_sub_count(&self) -> i32;
fn get_username(&self) -> String;
fn set_username(&self, username: String) -> Result<Success, Error>;
}Required Methods§
Sourcefn get_address(&self) -> Option<IpAddr>
fn get_address(&self) -> Option<IpAddr>
Binding to mosquitto_client_address NOTE: stored sessions might be disconnected upon a restart, and then the client being disconnected will have no IP address, the address will then be of type None
Sourcefn is_clean_session(&self) -> bool
fn is_clean_session(&self) -> bool
Binding to mosquitto_client_clean_session
Sourcefn get_keepalive(&self) -> i32
fn get_keepalive(&self) -> i32
Binding to mosquitto_client_keepalive
Sourcefn get_certificate(&self) -> Option<&[u8]>
fn get_certificate(&self) -> Option<&[u8]>
Binding to mosquitto_client_certificate
Sourcefn get_protocol(&self) -> MosquittoClientProtocol
fn get_protocol(&self) -> MosquittoClientProtocol
Binding to mosquitto_client_protocol
Sourcefn get_protocol_version(&self) -> MosquittoClientProtocolVersion
fn get_protocol_version(&self) -> MosquittoClientProtocolVersion
Binding to mosquitto_client_protocol_version
Sourcefn get_sub_count(&self) -> i32
fn get_sub_count(&self) -> i32
Binding to mosquitto_client_sub_count
Sourcefn get_username(&self) -> String
fn get_username(&self) -> String
Binding to mosquitto_client_username