pub enum StrError {
CapacityExceeded(BytesError),
InvalidUtf8(Utf8Error),
NullPointer,
}Available on crate features
types-str and types only.Expand description
Variants§
CapacityExceeded(BytesError)
长度超出容器容量。
InvalidUtf8(Utf8Error)
源内容不是合法 UTF-8(源仍会被清零)。
NullPointer
收到空指针。
Trait Implementations§
Source§impl Error for StrError
impl Error for StrError
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()
Auto Trait Implementations§
impl Freeze for StrError
impl RefUnwindSafe for StrError
impl Send for StrError
impl Sync for StrError
impl Unpin for StrError
impl UnsafeUnpin for StrError
impl UnwindSafe for StrError
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