pub enum WxErrorException {
Wx(WxErrorError),
Runtime(WxRuntimeError),
Io(String),
Http(String),
Serde(String),
}Expand description
微信接口调用统一错误类型。
对应 Java WxErrorException(checked)与 WxRuntimeException(unchecked)的合并;
所有 Service 方法以 Result<T, WxErrorException> 返回。
Variants§
Wx(WxErrorError)
微信接口返回的业务错误(对应 Java WxErrorException(WxError))
Runtime(WxRuntimeError)
运行时错误(对应 Java WxRuntimeException:重试超限、token 超时等)
Io(String)
IO 错误
Http(String)
HTTP 请求错误
Serde(String)
序列化错误
Implementations§
Trait Implementations§
Source§impl Clone for WxErrorException
impl Clone for WxErrorException
Source§fn clone(&self) -> WxErrorException
fn clone(&self) -> WxErrorException
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WxErrorException
impl Debug for WxErrorException
Source§impl Display for WxErrorException
impl Display for WxErrorException
Source§impl Error for WxErrorException
impl Error for WxErrorException
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 WxErrorException
impl From<Error> for WxErrorException
Source§impl From<Error> for WxErrorException
impl From<Error> for WxErrorException
Source§impl From<Error> for WxErrorException
impl From<Error> for WxErrorException
Source§impl From<WxErrorError> for WxErrorException
impl From<WxErrorError> for WxErrorException
Source§fn from(source: WxErrorError) -> Self
fn from(source: WxErrorError) -> Self
Converts to this type from the input type.
Source§impl From<WxRuntimeError> for WxErrorException
impl From<WxRuntimeError> for WxErrorException
Source§fn from(source: WxRuntimeError) -> Self
fn from(source: WxRuntimeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for WxErrorException
impl RefUnwindSafe for WxErrorException
impl Send for WxErrorException
impl Sync for WxErrorException
impl Unpin for WxErrorException
impl UnsafeUnpin for WxErrorException
impl UnwindSafe for WxErrorException
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