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 more
sourceimpl Debug for StringError
impl Debug for StringError
sourceimpl Display for StringError
impl Display for StringError
sourceimpl Error for StringError
This is supported on crate feature std
only.
impl Error for StringError
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
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &StringError) -> bool
fn ne(&self, other: &StringError) -> bool
This method tests for !=
.
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more