pub struct AptosError {
pub message: String,
pub error_code: AptosErrorCode,
pub vm_error_code: Option<i32>,
}Expand description
AptosError : This is the generic struct we use for all API errors, it contains a string message and an Aptos API specific error code.
Fields§
§message: StringA message describing the error
error_code: AptosErrorCode§vm_error_code: Option<i32>A code providing VM error details when submitting transactions to the VM
Implementations§
Source§impl AptosError
impl AptosError
Sourcepub fn new(message: String, error_code: AptosErrorCode) -> AptosError
pub fn new(message: String, error_code: AptosErrorCode) -> AptosError
This is the generic struct we use for all API errors, it contains a string message and an Aptos API specific error code.
Trait Implementations§
Source§impl Clone for AptosError
impl Clone for AptosError
Source§fn clone(&self) -> AptosError
fn clone(&self) -> AptosError
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 AptosError
impl Debug for AptosError
Source§impl Default for AptosError
impl Default for AptosError
Source§fn default() -> AptosError
fn default() -> AptosError
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AptosError
impl<'de> Deserialize<'de> for AptosError
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 PartialEq for AptosError
impl PartialEq for AptosError
Source§fn eq(&self, other: &AptosError) -> bool
fn eq(&self, other: &AptosError) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AptosError
impl Serialize for AptosError
impl StructuralPartialEq for AptosError
Auto Trait Implementations§
impl Freeze for AptosError
impl RefUnwindSafe for AptosError
impl Send for AptosError
impl Sync for AptosError
impl Unpin for AptosError
impl UnsafeUnpin for AptosError
impl UnwindSafe for AptosError
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