Struct paho_mqtt::string_collection::StringCollection
[−]
[src]
pub struct StringCollection { /* fields omitted */ }
A collection of C-compatible (NUL-terminated) strings that is useful with
C API's that require an array of strings, normally specified as:
const char* arr[]
or const char** arr
Methods
impl StringCollection
[src]
fn new(coll: &Vec<String>) -> StringCollection
Creates a StringCollection from a vector of strings.
fn len(&self) -> usize
Gets the number of strings in the collection.
fn as_c_arr_ptr(&self) -> *const *const c_char
Gets the collection as a pointer to C string pointers.
This returns a pointer that can be sent to a C API that takes a
pointer to an array of char pointers, like const char* arr[]
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
impl Debug for StringCollection
[src]
impl Default for StringCollection
[src]
fn default() -> StringCollection
Returns the "default value" for a type. Read more
impl Clone for StringCollection
[src]
fn clone(&self) -> StringCollection
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more