pub enum ThrustError {
ParseError(String),
FileNotFound(String),
InvalidData(String),
Io(String),
ZipError(String),
XmlError(String),
CsvError(String),
NetworkError(String),
DatabaseError(String),
MissingField(String),
Other(String),
}Expand description
A unified error type for thrust operations.
This enum represents all possible error conditions that can occur when parsing aviation data, querying databases, or performing I/O operations.
§Examples
use thrust::ThrustError;
let err = ThrustError::ParseError("Invalid altitude format".to_string());
assert!(matches!(err, ThrustError::ParseError(_)));Variants§
ParseError(String)
Parsing error with descriptive message
FileNotFound(String)
File not found or inaccessible
InvalidData(String)
Invalid or corrupted data
Io(String)
I/O error (read, write, seek, etc.)
ZipError(String)
ZIP file processing error
XmlError(String)
XML parsing or validation error
CsvError(String)
CSV parsing error
NetworkError(String)
HTTP/network error
DatabaseError(String)
Database operation error
MissingField(String)
Missing required field or data
Other(String)
Generic error with context
Trait Implementations§
Source§impl Clone for ThrustError
impl Clone for ThrustError
Source§fn clone(&self) -> ThrustError
fn clone(&self) -> ThrustError
Returns a duplicate of the value. Read more
1.0.0 · 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 ThrustError
impl Debug for ThrustError
Source§impl Display for ThrustError
impl Display for ThrustError
Source§impl Error for ThrustError
impl Error for ThrustError
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 From<&str> for ThrustError
impl From<&str> for ThrustError
Source§impl From<AttrError> for ThrustError
impl From<AttrError> for ThrustError
Source§impl From<Error> for ThrustError
impl From<Error> for ThrustError
Source§impl From<Error> for ThrustError
impl From<Error> for ThrustError
Source§impl From<Error> for ThrustError
impl From<Error> for ThrustError
Source§impl From<Error> for ThrustError
impl From<Error> for ThrustError
Source§impl From<ParseError> for ThrustError
impl From<ParseError> for ThrustError
Source§fn from(e: ParseError) -> Self
fn from(e: ParseError) -> Self
Converts to this type from the input type.
Source§impl From<ParseFloatError> for ThrustError
impl From<ParseFloatError> for ThrustError
Source§fn from(e: ParseFloatError) -> Self
fn from(e: ParseFloatError) -> Self
Converts to this type from the input type.
Source§impl From<String> for ThrustError
impl From<String> for ThrustError
Source§impl From<Utf8Error> for ThrustError
impl From<Utf8Error> for ThrustError
Auto Trait Implementations§
impl Freeze for ThrustError
impl RefUnwindSafe for ThrustError
impl Send for ThrustError
impl Sync for ThrustError
impl Unpin for ThrustError
impl UnsafeUnpin for ThrustError
impl UnwindSafe for ThrustError
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