pub enum ModelLoaderError {
ApiError(ApiError),
IoError(Error),
ParseError(Error),
}
Expand description
ModelLoaderError
is an enumeration of potential errors that can occur
during the model loading process. It includes API errors, I/O errors,
and parsing errors. Each variant wraps the underlying error for further
inspection if necessary.
ApiError
: This variant is used when an error occurs while interacting with the API during the model loading process.IoError
: This variant is used when an I/O error occurs, for example, when reading the model configuration file.ParseError
: This variant is used when an error occurs while parsing the model configuration file.
Each variant uses the #[from]
attribute to automatically implement the From
trait,
allowing for easy conversion from the wrapped error types to ModelLoaderError
.
Variants§
Trait Implementations§
source§impl Debug for ModelLoaderError
impl Debug for ModelLoaderError
source§impl Display for ModelLoaderError
impl Display for ModelLoaderError
source§impl Error for ModelLoaderError
impl Error for ModelLoaderError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<ApiError> for ModelLoaderError
impl From<ApiError> for ModelLoaderError
source§impl From<Error> for ModelLoaderError
impl From<Error> for ModelLoaderError
Auto Trait Implementations§
impl Freeze for ModelLoaderError
impl !RefUnwindSafe for ModelLoaderError
impl Send for ModelLoaderError
impl Sync for ModelLoaderError
impl Unpin for ModelLoaderError
impl !UnwindSafe for ModelLoaderError
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request