pub enum DiffusionError {
ReqwestError(Error),
InvalidHeader(InvalidHeaderValue),
ImageStatusNotReady,
UnknownHttpError(StatusCode),
TimeExpired,
InvalidStepAmount,
InvalidModel,
InvalidSize,
InvalidOrientation,
}Expand description
Potential errors returned from the library
Variants§
ReqwestError(Error)
Errors returned from the underlying reqwest library
InvalidHeader(InvalidHeaderValue)
An invalid header
ImageStatusNotReady
Image has not been fully created yet
UnknownHttpError(StatusCode)
Unknown HTTP error returned from the API
TimeExpired
The image was not created within the timeout
InvalidStepAmount
Invalid step amount given
InvalidModel
Invalid model given
InvalidSize
Invalid size given
InvalidOrientation
Invalid orientation given
Trait Implementations§
Source§impl Debug for DiffusionError
impl Debug for DiffusionError
Source§impl Display for DiffusionError
impl Display for DiffusionError
Source§impl Error for DiffusionError
impl Error for DiffusionError
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<Error> for DiffusionError
impl From<Error> for DiffusionError
Source§impl From<InvalidHeaderValue> for DiffusionError
impl From<InvalidHeaderValue> for DiffusionError
Source§fn from(source: InvalidHeaderValue) -> Self
fn from(source: InvalidHeaderValue) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DiffusionError
impl !RefUnwindSafe for DiffusionError
impl Send for DiffusionError
impl Sync for DiffusionError
impl Unpin for DiffusionError
impl !UnwindSafe for DiffusionError
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