#[non_exhaustive]pub enum IonError {
Io(IoError),
Incomplete(IncompleteError),
Encoding(EncodingError),
Decoding(DecodingError),
IllegalOperation(IllegalOperation),
Conversion(ConversionError),
}Expand description
Represents the different types of high-level failures that might occur when reading Ion data.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(IoError)
Indicates that an IO error was encountered while reading or writing.
Incomplete(IncompleteError)
Indicates that the input buffer did not contain enough data to perform the requested read operation. If the input source contains more data, the reader can append it to the buffer and try again.
Encoding(EncodingError)
Indicates that the writer encountered a problem while serializing a given piece of data.
Decoding(DecodingError)
Indicates that the data stream being read contained illegal or otherwise unreadable data.
IllegalOperation(IllegalOperation)
Returned when the user has performed an illegal operation (for example: calling stepOut() on the cursor at the top level.)
Conversion(ConversionError)
Returned when the user has attempted to convert a value to a type for which that value is not trivially convertable.
Trait Implementations§
Source§impl Error for IonError
impl Error for IonError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl<FromType, ToType> From<ConversionOperationError<FromType, ToType>> for IonErrorwhere
FromType: ValueTypeExpectation,
ToType: TypeExpectation,
impl<FromType, ToType> From<ConversionOperationError<FromType, ToType>> for IonErrorwhere
FromType: ValueTypeExpectation,
ToType: TypeExpectation,
Source§fn from(err: ConversionOperationError<FromType, ToType>) -> Self
fn from(err: ConversionOperationError<FromType, ToType>) -> Self
impl StructuralPartialEq for IonError
Auto Trait Implementations§
impl !RefUnwindSafe for IonError
impl !UnwindSafe for IonError
impl Freeze for IonError
impl Send for IonError
impl Sync for IonError
impl Unpin for IonError
impl UnsafeUnpin for IonError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more