pub enum TitaniumError {
Gateway(GatewayError),
Http(HttpError),
Framework(String),
Other(Box<dyn Error + Send + Sync>),
}Expand description
Unified error type for the Titanium framework.
Variants§
Gateway(GatewayError)
Errors from the Gateway (WebSocket, Sharding).
Http(HttpError)
Errors from the HTTP client (REST API).
Framework(String)
Errors from the Framework (Command handling).
Other(Box<dyn Error + Send + Sync>)
Generic errors from user code or other sources.
Trait Implementations§
Source§impl Debug for TitaniumError
impl Debug for TitaniumError
Source§impl Display for TitaniumError
impl Display for TitaniumError
Source§impl Error for TitaniumError
impl Error for TitaniumError
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<GatewayError> for TitaniumError
impl From<GatewayError> for TitaniumError
Source§fn from(source: GatewayError) -> Self
fn from(source: GatewayError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TitaniumError
impl !RefUnwindSafe for TitaniumError
impl Send for TitaniumError
impl Sync for TitaniumError
impl Unpin for TitaniumError
impl !UnwindSafe for TitaniumError
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.