Skip to main content

string

Type Alias string 

Source
pub type string = basic_string<Pod<i8>>;
Expand description

对应std::string

Aliased Type§

pub struct string { /* private fields */ }

Implementations§

Source§

impl string

Source

pub fn with_buf(b: &[u8]) -> Self

Source

pub fn as_buf(&self) -> &[u8]

Source

pub fn as_cstr(&self) -> &CStr

Source§

impl string

Source

pub fn new() -> <string as AbiType>::OutputType

cpp global function: std::unique_ptr<std::string> hicc::make_unique<std::string>()

Source§

impl string

Source

pub fn with_cstr(s: &CStr) -> <string as AbiType>::OutputType

cpp global function: std::unique_ptr<std::string> hicc::make_unique<std::string, const char*>(const char* &&)

Source§

impl string

Source

pub unsafe fn with_cbuf( s: *const u8, len: usize, ) -> <string as AbiType>::OutputType

cpp global function: std::unique_ptr<std::string> hicc::make_unique<std::string, const char*, size_t>(const char* &&, size_t&&)

Trait Implementations§

Source§

impl Default for string

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl From<&CStr> for string

Source§

fn from(s: &CStr) -> Self

Converts to this type from the input type.