pub enum OpenCCError {
InvalidConfigPath,
ConfigPathContainsNul,
InputContainsNul,
OpenCC(String),
InvalidOutput,
}Expand description
Errors returned by the OpenCC wrapper.
Variants§
InvalidConfigPath
The config file path is not valid UTF-8.
ConfigPathContainsNul
The config file path contains a null byte.
InputContainsNul
The input string contains a null byte.
OpenCC(String)
OpenCC reported an error through its C API.
InvalidOutput
OpenCC returned bytes that are not valid UTF-8.
Trait Implementations§
Source§impl Clone for OpenCCError
impl Clone for OpenCCError
Source§fn clone(&self) -> OpenCCError
fn clone(&self) -> OpenCCError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OpenCCError
impl Debug for OpenCCError
Source§impl Display for OpenCCError
impl Display for OpenCCError
impl Eq for OpenCCError
Source§impl Error for OpenCCError
impl Error for OpenCCError
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()
Source§impl PartialEq for OpenCCError
impl PartialEq for OpenCCError
Source§fn eq(&self, other: &OpenCCError) -> bool
fn eq(&self, other: &OpenCCError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for OpenCCError
Auto Trait Implementations§
impl Freeze for OpenCCError
impl RefUnwindSafe for OpenCCError
impl Send for OpenCCError
impl Sync for OpenCCError
impl Unpin for OpenCCError
impl UnsafeUnpin for OpenCCError
impl UnwindSafe for OpenCCError
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