Enum twilight_http::error::Error [−][src]
#[non_exhaustive] pub enum Error {}Show variants
BuildingRequest { source: HttpError, }, ChunkingResponse { source: HyperError, }, CreatingHeader { name: String, source: InvalidHeaderValue, }, Formatting { source: FmtError, }, Json { source: JsonError, }, Parsing { body: Vec<u8>, source: JsonError, }, Ratelimiting { source: RatelimitError, }, RequestCanceled { source: Canceled, }, RequestError { source: HyperError, }, RequestTimedOut { source: Elapsed, }, Response { body: Vec<u8>, error: ApiError, status: StatusCode, }, ServiceUnavailable { response: Response<Body>, }, Unauthorized,
Variants (Non-exhaustive)
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Show fields
Fields of BuildingRequest
source: HttpError
Show fields
Fields of ChunkingResponse
source: HyperError
Show fields
Fields of CreatingHeader
name: String
source: InvalidHeaderValue
Show fields
Fields of Formatting
source: FmtError
Show fields
Fields of Json
source: JsonError
Show fields
Fields of Ratelimiting
source: RatelimitError
Show fields
Fields of RequestCanceled
source: Canceled
Show fields
Fields of RequestError
source: HyperError
Show fields
Fields of RequestTimedOut
source: Elapsed
Source of the error when the request timed out.
Show fields
Fields of Response
API service is unavailable. Consider re-sending the request at a later time.
This may occur during Discord API stability incidents.
Show fields
Token in use has become revoked or is otherwise invalid.
This can occur if a bot token is invalidated or an access token expires or is revoked. Recreate the client to configure a new token.
Trait Implementations
impl Error for Error
[src]
impl Error for Error
[src]fn source(&self) -> Option<&(dyn StdError + 'static)>
[src]
fn source(&self) -> Option<&(dyn StdError + 'static)>
[src]The lower-level source of this error, if any. Read more
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]🔬 This is a nightly-only experimental API. (
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
fn description(&self) -> &str
1.0.0[src]
fn description(&self) -> &str
1.0.0[src]👎 Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,