Struct swiss_army_knife::strings::NulTerminatedCStringArray [−][src]
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_strings_as_fragments_to_combine: impl Iterator<Item = impl CStringFragments>,
page_size: impl Into<usize>
) -> Self
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]ⓘ
[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]
fn clone(&self) -> NulTerminatedCStringArray
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for NulTerminatedCStringArray
[src]
impl Eq for NulTerminatedCStringArray
[src]
impl Hash for NulTerminatedCStringArray
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for NulTerminatedCStringArray
[src]
fn cmp(&self, other: &NulTerminatedCStringArray) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<NulTerminatedCStringArray> for NulTerminatedCStringArray
[src]
fn eq(&self, other: &NulTerminatedCStringArray) -> bool
[src]
fn ne(&self, other: &NulTerminatedCStringArray) -> bool
[src]
impl PartialOrd<NulTerminatedCStringArray> for NulTerminatedCStringArray
[src]
fn partial_cmp(&self, other: &NulTerminatedCStringArray) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for NulTerminatedCStringArray
[src]
impl StructuralPartialEq for NulTerminatedCStringArray
[src]
Auto Trait Implementations
impl RefUnwindSafe for NulTerminatedCStringArray
impl !Send for NulTerminatedCStringArray
impl !Sync for NulTerminatedCStringArray
impl Unpin for NulTerminatedCStringArray
impl UnwindSafe for NulTerminatedCStringArray
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> CallHasher for T where
T: Hash,
T: Hash,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,