[−][src]Struct rvk::error::APIError
An error returned by the API.
Implementations
impl APIError
[src]
pub fn new(code: u64, msg: String, extra: HashMap<String, Value>) -> Self
[src]
Creates a new APIError
.
pub fn code(&self) -> u64
[src]
Returns the code of this APIError
.
let err = APIError::new(0, "test".into(), HashMap::new()); assert_eq!(err.code(), 0);
pub fn msg(&self) -> &String
[src]
Returns the message of this APIError
.
let err = APIError::new(0, "test".into(), HashMap::new()); assert_eq!(err.msg(), "test");
pub fn extra(&self) -> &HashMap<String, Value>
[src]
Returns the extra fields of this APIError
.
let err = APIError::new(0, "test".into(), HashMap::new()); assert_eq!(err.extra().clone(), HashMap::<String, Value>::new());
Trait Implementations
impl Clone for APIError
[src]
impl Debug for APIError
[src]
impl<'de> Deserialize<'de> for APIError
[src]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl From<APIError> for Error
[src]
impl PartialEq<APIError> for APIError
[src]
impl Serialize for APIError
[src]
pub fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for APIError
[src]
Auto Trait Implementations
impl RefUnwindSafe for APIError
[src]
impl Send for APIError
[src]
impl Sync for APIError
[src]
impl Unpin for APIError
[src]
impl UnwindSafe for APIError
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,