pub enum ConvertError {
Parse(ParseError),
Message(String),
}Expand description
Error of a reader, writer, or converter for a format other than CON text: the extended-XYZ and PDB scanners and the Cap’n Proto frame converters.
A failure with a CON error class, such as a non-finite cell, is
ConvertError::Parse and keeps its ParseError. The format’s own
diagnostics are ConvertError::Message. Display is the inner text in
both cases.
Variants§
Parse(ParseError)
Message(String)
Implementations§
Source§impl ConvertError
impl ConvertError
Sourcepub fn parse_error(&self) -> Option<&ParseError>
pub fn parse_error(&self) -> Option<&ParseError>
The typed error, when this failure has a CON error class.
Sourcepub fn is_non_finite_cell(&self) -> bool
pub fn is_non_finite_cell(&self) -> bool
True for the error ParseError::non_finite_cell makes.
Sourcepub fn in_frame(self, frame: u64) -> Self
pub fn in_frame(self, frame: u64) -> Self
ParseError::in_frame on a typed error. A message is returned as
it was.
Trait Implementations§
Source§impl Clone for ConvertError
impl Clone for ConvertError
Source§impl Debug for ConvertError
impl Debug for ConvertError
Source§impl Display for ConvertError
impl Display for ConvertError
Source§impl Error for ConvertError
impl Error for ConvertError
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 From<&str> for ConvertError
impl From<&str> for ConvertError
Source§impl From<ConvertError> for String
The text of the error. ParseError::from_cell_text recovers a
non-finite cell error from it.
impl From<ConvertError> for String
The text of the error. ParseError::from_cell_text recovers a
non-finite cell error from it.
Source§fn from(error: ConvertError) -> Self
fn from(error: ConvertError) -> Self
Converts to this type from the input type.
Source§impl From<ParseError> for ConvertError
impl From<ParseError> for ConvertError
Source§fn from(error: ParseError) -> Self
fn from(error: ParseError) -> Self
Converts to this type from the input type.
Source§impl From<String> for ConvertError
impl From<String> for ConvertError
Source§impl PartialEq<&str> for ConvertError
impl PartialEq<&str> for ConvertError
Auto Trait Implementations§
impl Forget for ConvertError
impl Freeze for ConvertError
impl Move for ConvertError
impl RefUnwindSafe for ConvertError
impl Send for ConvertErrorwhere
RawVecInner: Send,
impl Sync for ConvertErrorwhere
RawVecInner: Sync,
impl Unpin for ConvertError
impl UnsafeUnpin for ConvertError
impl UnwindSafe for ConvertErrorwhere
RawVecInner: UnwindSafe,
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