Trait lrs::string::ToCString

Objects that can be turned into a CString by allocating.

Syntax

trait ToCString {
    /* Required methods */
    fn to_cstring<H>(&self) -> Result<CString<H>, Errno>
        where H: Allocator,
              <H as Allocator>::Pool: Default,

    /* Provided methods */
    fn rmo_cstr<H>(&'a self, _buf: &'a mut [u8]) -> Result<Rmo<'a, CStr, H>, Errno>
        where H: Allocator,
              <H as Allocator>::Pool: Default,
}

Methods

ReceiverNameDescription
&selfrmo_cstr

Tries to convert the object into an Rmo<CStr> with or without allocating.

&selfto_cstring

Converts the object into an allocated CString.