pub enum CStrError {
CapacityExceeded(BytesError),
InteriorNul(usize),
MissingNul,
NullPointer,
}Available on crate features
types-cstr and types only.Expand description
Variants§
CapacityExceeded(BytesError)
长度超出容器容量(含结尾 \0 的总需求超出 N)。
InteriorNul(usize)
载荷内部含 NUL,载荷为 NUL 在载荷内的字节下标。
MissingNul
输入中找不到结尾 NUL(源仍会被清零)。
NullPointer
收到空指针。
Trait Implementations§
impl Copy for CStrError
impl Eq for CStrError
Source§impl Error for CStrError
impl Error for CStrError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl StructuralPartialEq for CStrError
Auto Trait Implementations§
impl Freeze for CStrError
impl RefUnwindSafe for CStrError
impl Send for CStrError
impl Sync for CStrError
impl Unpin for CStrError
impl UnsafeUnpin for CStrError
impl UnwindSafe for CStrError
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
Mutably borrows from an owned value. Read more