Enum voodoo::util::CharStrs
[−]
[src]
pub enum CharStrs<'cs> { Ptr { ptr: *const *const c_char, len: usize, }, RefPtr { ptrs: &'cs [*const c_char], }, OwnedPtr { ptrs: Vec<*const c_char>, }, OwnedOwned { strings: Vec<CString>, ptrs: Vec<*const c_char>, }, }
Either a borrowed list of borrowed char pointers, an owned list of
borrowed char pointers, or owned lists of both CString
s and pointers to
their internal arrays.
Variants
Ptr
Fields of Ptr
ptr: *const *const c_char | |
len: usize |
RefPtr
Fields of RefPtr
ptrs: &'cs [*const c_char] |
OwnedPtr
Fields of OwnedPtr
ptrs: Vec<*const c_char> |
OwnedOwned
Fields of OwnedOwned
strings: Vec<CString> | |
ptrs: Vec<*const c_char> |
Methods
impl<'cs> CharStrs<'cs>
[src]
pub fn len(&self) -> usize
[src]
pub fn as_ptr(&self) -> *const *const c_char
[src]
pub fn as_ptr_slice(&self) -> &'cs [*const c_char]
[src]
Trait Implementations
impl<'cs> Debug for CharStrs<'cs>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'cs> Clone for CharStrs<'cs>
[src]
fn clone(&self) -> CharStrs<'cs>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'cs, 'p> From<&'p [*const c_char]> for CharStrs<'cs> where
'p: 'cs,
[src]
'p: 'cs,
impl<'cs, 'p, 'q> From<&'p [&'q [u8]]> for CharStrs<'cs> where
'q: 'p,
'p: 'cs,
[src]
'q: 'p,
'p: 'cs,
impl<'cs, 'p, 'q> From<&'p [&'q CStr]> for CharStrs<'cs> where
'q: 'p,
'p: 'cs,
[src]
'q: 'p,
'p: 'cs,
impl<'cs, 'p, 'q> From<&'p [&'q str]> for CharStrs<'cs> where
'q: 'p,
'p: 'cs,
[src]
'q: 'p,
'p: 'cs,