pub trait StringConvert {
// Required methods
fn to_utf8_string(&self) -> CtpResult<String>;
fn from_utf8_string(s: &str) -> CtpResult<Self>
where Self: Sized;
}
Expand description
字符串转换特质
为固定长度的字节数组提供UTF-8字符串转换功能
Required Methods§
Sourcefn to_utf8_string(&self) -> CtpResult<String>
fn to_utf8_string(&self) -> CtpResult<String>
将字节数组转换为UTF-8字符串
Sourcefn from_utf8_string(s: &str) -> CtpResult<Self>where
Self: Sized,
fn from_utf8_string(s: &str) -> CtpResult<Self>where
Self: Sized,
从UTF-8字符串创建字节数组