pub struct BybitContentError {
pub code: i32,
pub msg: String,
}Expand description
BybitContentError is a struct that represents the error returned by the Bybit API. It has two fields: code, which is an i16 representing the error code, and msg, which is a String representing the error message.
Fields§
§code: i32The raw error code returned by the Bybit API, you can use this to map
to a specific error type by calling self.typed(), this is useful if
you want to match on a specific error type.
msg: StringThe error message returned by the Bybit API.
Implementations§
Source§impl BybitContentError
impl BybitContentError
Sourcepub fn typed(&self) -> Option<ReturnCode>
pub fn typed(&self) -> Option<ReturnCode>
A typed version of the error code, this is useful if you want to match on a specific error type.
Trait Implementations§
Source§impl Debug for BybitContentError
impl Debug for BybitContentError
Source§impl<'de> Deserialize<'de> for BybitContentError
impl<'de> Deserialize<'de> for BybitContentError
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
Auto Trait Implementations§
impl Freeze for BybitContentError
impl RefUnwindSafe for BybitContentError
impl Send for BybitContentError
impl Sync for BybitContentError
impl Unpin for BybitContentError
impl UnwindSafe for BybitContentError
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