MosquittoClient

Struct MosquittoClient 

Source
pub struct MosquittoClient {
    pub client: *mut mosquitto,
}

Fields§

§client: *mut mosquitto

Trait Implementations§

Source§

impl MosquittoClientContext for MosquittoClient

Source§

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
Source§

fn is_clean_session(&self) -> bool

Binding to mosquitto_client_clean_session
Source§

fn get_id(&self) -> Option<String>

Binding to mosquitto_client_id
Source§

fn get_keepalive(&self) -> i32

Binding to mosquitto_client_keepalive
Source§

fn get_certificate(&self) -> Option<&[u8]>

Binding to mosquitto_client_certificate
Source§

fn get_protocol(&self) -> MosquittoClientProtocol

Binding to mosquitto_client_protocol
Source§

fn get_protocol_version(&self) -> MosquittoClientProtocolVersion

Binding to mosquitto_client_protocol_version
Source§

fn get_sub_count(&self) -> i32

Binding to mosquitto_client_sub_count
Source§

fn get_username(&self) -> String

Binding to mosquitto_client_username
Source§

fn set_username(&self, username: String) -> Result<Success, Error>

Binding to mosquitto_set_username Error is either NoMem or Inval

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.