Struct paho_mqtt::name_value::NameValueCollection
source · [−]pub struct NameValueCollection { /* private fields */ }
Expand description
A collection of C-compatible (NUL-terminated) string pairs that is
useful with C APIs that require an array of string pair pointers,
normally specified as const* MQTTAsync_nameValue
Implementations
sourceimpl NameValueCollection
impl NameValueCollection
sourcepub fn new<N, V>(coll: &[(N, V)]) -> Self where
N: AsRef<str>,
V: AsRef<str>,
pub fn new<N, V>(coll: &[(N, V)]) -> Self where
N: AsRef<str>,
V: AsRef<str>,
Creates a NameValueCollection from a vector of string pair references.
Arguments
coll
A collection of string pair references.
sourcepub fn as_c_arr_ptr(&self) -> *const MQTTAsync_nameValue
pub fn as_c_arr_ptr(&self) -> *const MQTTAsync_nameValue
Gets the collection as a pointer to const C string pair pointers.
This returns a pointer that can be sent to a C API that takes a
pointer to an array of name/value char pointer pairs, like
const MQTTAsync_nameValue*
This function is inherently unsafe. The pointer it returns is only valid while the collection remains unmodified. In general, it should be requested when needed and not stored for future use.
Trait Implementations
sourceimpl Clone for NameValueCollection
impl Clone for NameValueCollection
sourceimpl Debug for NameValueCollection
impl Debug for NameValueCollection
sourceimpl Default for NameValueCollection
impl Default for NameValueCollection
Auto Trait Implementations
impl RefUnwindSafe for NameValueCollection
impl !Send for NameValueCollection
impl !Sync for NameValueCollection
impl Unpin for NameValueCollection
impl UnwindSafe for NameValueCollection
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more