Struct std::ffi::IntoStringError 1.7.0[−][src]
pub struct IntoStringError { /* fields omitted */ }Expand description
将 CString 转换为 String 时,指示 UTF-8 无效的错误。
CString 只是一个带有 nul 终止符的字节缓冲区的包装器;
CString::into_string 对这些字节执行 UTF-8 验证,并可能返回此错误。
该 struct 由 CString::into_string() 创建。有关更多信息,请参见其文档。
Implementations
消耗此错误,返回产生错误的原始 CString。
访问根本的 UTF-8 错误,该错误是引起此错误的原因。
Trait Implementations
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
此方法测试 self 和 other 值是否相等,并由 == 使用。 Read more
此方法测试 !=。