#[non_exhaustive]#[repr(isize)]pub enum ErrorKind {
OutOfMemory = -1,
StringOverflow = -2,
InvalidUtf8 = -3,
NotAssigned = -4,
InvalidOptions = -5,
}
Expand description
Indicates the type of the underlying utf8proc::Error
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
OutOfMemory = -1
Memory allocation failed.
StringOverflow = -2
The string is too long to be processed.
InvalidUtf8 = -3
The given string is not a legal UTF-8 string.
NotAssigned = -4
The UTF8PROC_REJECTNA
flag has been set and unassigned codepoint has been found.
InvalidOptions = -5
Invalid options have been passed to a FFI function.
The safe utf8proc.rs wrapper validates options before giving it to the underlying FFI function. So this error should generally not happen. It should instead be prevented by the type system or trigger a descriptive panic.
Trait Implementations§
Source§impl FromPrimitive for ErrorKind
impl FromPrimitive for ErrorKind
impl Copy for ErrorKind
impl Eq for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
impl Freeze for ErrorKind
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnwindSafe for ErrorKind
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