[][src]Enum staticvec::StringError

pub enum StringError {
    Utf8(Utf8Error),
    Utf16(DecodeUtf16Error),
    NotCharBoundary,
    OutOfBounds,
}

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.

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.

Methods

impl StringError[src]

pub fn is_utf8(&self) -> bool[src]

pub fn is_utf16(&self) -> bool[src]

pub fn is_out_of_bounds(&self) -> bool[src]

pub fn is_not_char_boundary(&self) -> bool[src]

Trait Implementations

impl Clone for StringError[src]

impl Debug for StringError[src]

impl Display for StringError[src]

impl Eq for StringError[src]

impl Error for StringError[src]

impl<const N: usize> From<CapacityError<N>> for StringError[src]

impl From<DecodeUtf16Error> for StringError[src]

impl From<Utf8Error> for StringError[src]

impl PartialEq<StringError> for StringError[src]

impl StructuralEq for StringError[src]

impl StructuralPartialEq for StringError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.