[−][src]Struct paho_mqtt::client_persistence::UserPersistence
A struct to wrap the user-defined client persistence objects for the C library, including the callback funtions from the C library. These functions receive the persistence callbacks from the C library and then pass them on to the user-supplied struct which implements the ClientPersistence trait.
Note that the C library does not keep a copy of the MQTTClient_persistence object, so the client must keep one and keep it at a consistent address. Thus it should be kept in a box on the heap.
Implementations
impl UserPersistence
[src]
pub fn new(persistence: ClientPersistenceType) -> UserPersistence
[src]
Creates a new user persistence object.
pub unsafe extern "C" fn on_open(
handle: *mut *mut c_void,
client_id: *const c_char,
server_uri: *const c_char,
context: *mut c_void
) -> c_int
[src]
handle: *mut *mut c_void,
client_id: *const c_char,
server_uri: *const c_char,
context: *mut c_void
) -> c_int
pub unsafe extern "C" fn on_close(handle: *mut c_void) -> c_int
[src]
Callback from the C library to close the persistence store.
pub unsafe extern "C" fn on_put(
handle: *mut c_void,
key: *mut c_char,
bufcount: c_int,
buffers: *mut *mut c_char,
buflens: *mut c_int
) -> c_int
[src]
handle: *mut c_void,
key: *mut c_char,
bufcount: c_int,
buffers: *mut *mut c_char,
buflens: *mut c_int
) -> c_int
Callback from the C library to add data to the persistence store
pub unsafe extern "C" fn on_get(
handle: *mut c_void,
key: *mut c_char,
buffer: *mut *mut c_char,
buflen: *mut c_int
) -> c_int
[src]
handle: *mut c_void,
key: *mut c_char,
buffer: *mut *mut c_char,
buflen: *mut c_int
) -> c_int
Callback from the C library to retrieve data from the persistence store.
pub unsafe extern "C" fn on_remove(
handle: *mut c_void,
key: *mut c_char
) -> c_int
[src]
handle: *mut c_void,
key: *mut c_char
) -> c_int
Callback from the C library to delete specific data from the persistence store.
pub unsafe extern "C" fn on_keys(
handle: *mut c_void,
keys: *mut *mut *mut c_char,
nkeys: *mut c_int
) -> c_int
[src]
handle: *mut c_void,
keys: *mut *mut *mut c_char,
nkeys: *mut c_int
) -> c_int
Callback from the C library to retrieve the set of keys from the persistence store.
pub unsafe extern "C" fn on_clear(handle: *mut c_void) -> c_int
[src]
Callback from the C library to remove all the data from the persistence store.
pub unsafe extern "C" fn on_contains_key(
handle: *mut c_void,
key: *mut c_char
) -> c_int
[src]
handle: *mut c_void,
key: *mut c_char
) -> c_int
Callback from the C library to determine if the store contains the specified key.
Auto Trait Implementations
impl !RefUnwindSafe for UserPersistence
[src]
impl !Send for UserPersistence
[src]
impl !Sync for UserPersistence
[src]
impl Unpin for UserPersistence
[src]
impl !UnwindSafe for UserPersistence
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,