pub enum AgentGenError {
Api {
status: u16,
message: String,
detail: Option<String>,
},
InsufficientTokens {
balance: i64,
required: i64,
buy_more_url: String,
},
Http(Error),
Io(Error),
Json(Error),
}Expand description
Errors returned by the AgentGen client.
Variants§
Api
The API returned a non-2xx response.
InsufficientTokens
The account has insufficient tokens for the requested operation.
Http(Error)
An underlying HTTP transport error.
Io(Error)
An I/O error (e.g. reading a file for upload).
Json(Error)
A serialization error while building the request body.
Trait Implementations§
Source§impl Debug for AgentGenError
impl Debug for AgentGenError
Source§impl Display for AgentGenError
impl Display for AgentGenError
Source§impl Error for AgentGenError
impl Error for AgentGenError
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 AgentGenError
impl From<Error> for AgentGenError
Source§impl From<Error> for AgentGenError
impl From<Error> for AgentGenError
Auto Trait Implementations§
impl Freeze for AgentGenError
impl !RefUnwindSafe for AgentGenError
impl Send for AgentGenError
impl Sync for AgentGenError
impl Unpin for AgentGenError
impl UnsafeUnpin for AgentGenError
impl !UnwindSafe for AgentGenError
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.