Struct swiss_army_knife::strings::NulTerminatedCStringArray[][src]

pub struct NulTerminatedCStringArray { /* fields omitted */ }

An array of c strings (nul terminated byte arrays) with a final nul.

buffer contains a list of NUL-terminated C strings, each with a terminating NUL, before terminating the entire list with NUL (ie there are two NUL bytes at the end). pointers points to C strings in buffer, with a final pointer of null().

NOTE: Empty strings are allowed, but, if using only the buffer, they can not be discovered simply by walking the buffer’s bytes.

Implementations

impl NulTerminatedCStringArray[src]

pub fn new<'a>(
    c_strings_as_fragments_to_combine: impl Iterator<Item = impl CStringFragments>,
    page_size: impl Into<usize>
) -> Self
[src]

c_string_components provides the pieces that are to create a CString.

pub fn as_array_of_pointers(&self) -> *const *const c_char[src]

Array of pointers.

pub fn as_block_of_strings(&self, preserve_final_nul_if_empty: bool) -> &[u8]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

Buffer, suitable for /proc/<pid>/environ and /proc/<pid>/cmdline if preserve_final_nul_if_empty is false.

Trait Implementations

impl Clone for NulTerminatedCStringArray[src]

impl Debug for NulTerminatedCStringArray[src]

impl Eq for NulTerminatedCStringArray[src]

impl Hash for NulTerminatedCStringArray[src]

impl Ord for NulTerminatedCStringArray[src]

impl PartialEq<NulTerminatedCStringArray> for NulTerminatedCStringArray[src]

impl PartialOrd<NulTerminatedCStringArray> for NulTerminatedCStringArray[src]

impl StructuralEq for NulTerminatedCStringArray[src]

impl StructuralPartialEq for NulTerminatedCStringArray[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CallHasher for T where
    T: Hash

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.