pub enum ImageGenError {
Http(Error),
Api {
code: String,
message: String,
},
Timeout(u64),
TaskFailed(String),
ParseError(String),
}Variants§
Http(Error)
Api
API returned a non-success status or an error body.
Timeout(u64)
Async task did not complete within the polling timeout.
TaskFailed(String)
Async task ended in a non-success terminal state (e.g. FAILED).
ParseError(String)
Unexpected response shape that could not be parsed.
Implementations§
Source§impl ImageGenError
impl ImageGenError
Sourcepub fn to_error_info(&self) -> ImageGenErrorInfo
pub fn to_error_info(&self) -> ImageGenErrorInfo
Extract structured error info for the LLM.
Trait Implementations§
Source§impl Debug for ImageGenError
impl Debug for ImageGenError
Source§impl Display for ImageGenError
impl Display for ImageGenError
Source§impl Error for ImageGenError
impl Error for ImageGenError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for ImageGenError
impl !UnwindSafe for ImageGenError
impl Freeze for ImageGenError
impl Send for ImageGenError
impl Sync for ImageGenError
impl Unpin for ImageGenError
impl UnsafeUnpin for ImageGenError
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