Tries to convert the object into an Rmo<CStr> with or without allocating.
fn rmo_cstr<H>(&'a self, _buf: &'a mut [u8]) -> Result<Rmo<'a, CStr, H>, Errno>
where H: Allocator,
<H as Allocator>::Pool: Default,| Name | Description |
|---|---|
| _buf | Scratch space. |
The general strategy is as follows: If the object can be interpreted as a CStr, a borrowed Rmo is returned. If it can be interpreted as a CStr by copying it into the provided buffer, it's copied and returned as a borrowed Rmo. Otherwise, a CString is allocated.
The default implementation simply calls to_cstring.