pub trait AsUnixStr: ToUnixString {
// Required methods
fn exec_with_self_as_ptr<F, T>(&self, func: F) -> Result<T, Error>
where F: FnOnce(*const u8) -> Result<T, Error>;
unsafe fn match_up_to(&self, null_terminated_pointer: *const u8) -> usize;
}
Executes a function with this null terminated entity
converts it to a string and pushes a null byte if not already null terminated
Propagates the function’s errors
Checks if this AsUnixStr
matches a null terminated pointer and returns the non null length
Pointer is null terminated