Struct std::ffi::FromBytesWithNulError
1.64.0 · source · pub struct FromBytesWithNulError { /* private fields */ }
Expand description
指示 nul 字节不在预期位置中的错误。
用于创建 CStr
的切片必须位于末尾且只有一个 nul 字节。
此错误是由 CStr::from_bytes_with_nul
方法创建的。
有关更多信息,请参见其文档。
Examples
use std::ffi::{CStr, FromBytesWithNulError};
let _: FromBytesWithNulError = CStr::from_bytes_with_nul(b"f\0oo").unwrap_err();
RunTrait Implementations§
source§impl Clone for FromBytesWithNulError
impl Clone for FromBytesWithNulError
source§fn clone(&self) -> FromBytesWithNulError
fn clone(&self) -> FromBytesWithNulError
返回值的副本。 Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
从
source
执行复制分配。 Read moresource§impl Debug for FromBytesWithNulError
impl Debug for FromBytesWithNulError
1.17.0 · source§impl Display for FromBytesWithNulError
impl Display for FromBytesWithNulError
1.17.0 · source§impl Error for FromBytesWithNulError
impl Error for FromBytesWithNulError
impl Eq for FromBytesWithNulError
impl StructuralEq for FromBytesWithNulError
impl StructuralPartialEq for FromBytesWithNulError
Auto Trait Implementations§
impl RefUnwindSafe for FromBytesWithNulError
impl Send for FromBytesWithNulError
impl Sync for FromBytesWithNulError
impl Unpin for FromBytesWithNulError
impl UnwindSafe for FromBytesWithNulError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
从拥有的值中借用。 Read more