Enum staticvec::StringError
source · [−]pub enum StringError {
Utf8(Utf8Error),
Utf16(DecodeUtf16Error),
NotCharBoundary,
OutOfBounds,
}
Expand description
This enum represents several different possible “error states” that may be encountered
while using a StaticString
.
Variants
Utf8(Utf8Error)
Indicates a failed conversion from a u8
slice to a
StaticString
.
Utf16(DecodeUtf16Error)
Indicates a failed conversion from a u16
slice to a
StaticString
.
NotCharBoundary
Indicates an attempted access of an invalid UTF-8 character index.
OutOfBounds
Indicates an out-of-bounds indexed access of a StaticString
instance.
Implementations
sourceimpl StringError
impl StringError
Trait Implementations
sourceimpl Clone for StringError
impl Clone for StringError
sourcefn clone(&self) -> StringError
fn clone(&self) -> StringError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for StringError
impl Debug for StringError
sourceimpl Display for StringError
impl Display for StringError
sourceimpl Error for StringError
Available on crate feature std
only.
impl Error for StringError
Available on crate feature
std
only.1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
sourceimpl<const N: usize> From<CapacityError<N>> for StringError
impl<const N: usize> From<CapacityError<N>> for StringError
sourceconst fn from(_err: CapacityError<N>) -> Self
const fn from(_err: CapacityError<N>) -> Self
Converts to this type from the input type.
sourceimpl From<DecodeUtf16Error> for StringError
impl From<DecodeUtf16Error> for StringError
sourceconst fn from(err: DecodeUtf16Error) -> Self
const fn from(err: DecodeUtf16Error) -> Self
Converts to this type from the input type.
sourceimpl From<Utf8Error> for StringError
impl From<Utf8Error> for StringError
sourceimpl PartialEq<StringError> for StringError
impl PartialEq<StringError> for StringError
sourcefn eq(&self, other: &StringError) -> bool
fn eq(&self, other: &StringError) -> bool
impl Eq for StringError
impl StructuralEq for StringError
impl StructuralPartialEq for StringError
Auto Trait Implementations
impl RefUnwindSafe for StringError
impl Send for StringError
impl Sync for StringError
impl Unpin for StringError
impl UnwindSafe for StringError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more