ToCppString

Trait ToCppString 

Source
pub trait ToCppString {
    // Required method
    fn into_cpp(self) -> UniquePtr<CxxString>;
}
Expand description

A trait to be implemented by any type that can be turned into a C++ string. This trait is generated once per autocxx FFI mod and each implementation is incompatible and separate, because each will use a function generated independently for each mod in order to do the actual conversion to a C++ string.

Required Methods§

Source

fn into_cpp(self) -> UniquePtr<CxxString>

Convert self into a C++ string in a cxx::UniquePtr.

Implementations on Foreign Types§

Source§

impl ToCppString for &str

Source§

impl ToCppString for &String

Source§

impl ToCppString for String

Source§

impl ToCppString for UniquePtr<CxxString>

Implementors§