pub struct CommonError {
pub errcode: i32,
pub errmsg: String,
}
Expand description
Almost every WeChat’s api calling will return a JSON value contains errcode
and errmsg
, that is a struct for it.
When the errcode == 0
, it can transmute to SdkResult<()>
.
Fields§
§errcode: i32
§errmsg: String
Trait Implementations§
Source§impl Clone for CommonError
impl Clone for CommonError
Source§fn clone(&self) -> CommonError
fn clone(&self) -> CommonError
Returns a duplicate of the value. Read more
1.0.0 · 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 CommonError
impl Debug for CommonError
Source§impl<'de> Deserialize<'de> for CommonError
impl<'de> Deserialize<'de> for CommonError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for CommonError
impl Display for CommonError
Source§impl Error for CommonError
impl Error for CommonError
1.30.0 · 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<CommonError> for SdkResult<()>
When the errcode == 0
, it can transmute to SdkResult<()>
.
impl From<CommonError> for SdkResult<()>
When the errcode == 0
, it can transmute to SdkResult<()>
.
Source§fn from(e: CommonError) -> Self
fn from(e: CommonError) -> Self
Converts to this type from the input type.
Source§impl From<CommonError> for SdkError
impl From<CommonError> for SdkError
Source§fn from(source: CommonError) -> Self
fn from(source: CommonError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CommonError
impl PartialEq for CommonError
Source§impl Serialize for CommonError
impl Serialize for CommonError
impl StructuralPartialEq for CommonError
Auto Trait Implementations§
impl Freeze for CommonError
impl RefUnwindSafe for CommonError
impl Send for CommonError
impl Sync for CommonError
impl Unpin for CommonError
impl UnwindSafe for CommonError
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