pub enum CharsetError {
NoSyntaxIdentifier,
Unsupported {
syntax_identifier: String,
},
InvalidBytes {
syntax_identifier: String,
offset: usize,
},
Unrepresentable {
syntax_identifier: String,
character: char,
position: usize,
},
}Expand description
Why an interchange could not be decoded or encoded.
Variants§
NoSyntaxIdentifier
The input has no UNB segment with a syntax identifier.
Unsupported
A syntax identifier this crate has no character set for.
InvalidBytes
A byte sequence that is not valid in the declared character set.
Unrepresentable
A character the declared character set cannot represent.
Trait Implementations§
Source§impl Clone for CharsetError
impl Clone for CharsetError
Source§impl Debug for CharsetError
impl Debug for CharsetError
Source§impl Display for CharsetError
impl Display for CharsetError
impl Eq for CharsetError
Source§impl Error for CharsetError
impl Error for CharsetError
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 CharsetError
impl PartialEq for CharsetError
impl StructuralPartialEq for CharsetError
Auto Trait Implementations§
impl Freeze for CharsetError
impl RefUnwindSafe for CharsetError
impl Send for CharsetError
impl Sync for CharsetError
impl Unpin for CharsetError
impl UnsafeUnpin for CharsetError
impl UnwindSafe for CharsetError
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