[−][src]Struct factom::responses::ApiResponse
JSON responses are deserialized into this struct
Fields
jsonrpc: String
id: u32
result: T
error: ApiError
Methods
impl<T> ApiResponse<T> where
T: Default,
[src]
T: Default,
pub fn is_err(&self) -> bool
[src]
Returns a boolean representing whether the api response returned an error This function does not deal with network errors, that is handled earlier by the Result from running the future query to completion.
pub fn success(&self) -> bool
[src]
Returns a boolean representing whether the api response returned an error This function does not deal with network errors, that is handled earlier by the Result from running the future query to completion.
Trait Implementations
impl<T: Debug> Debug for ApiResponse<T> where
T: Default,
[src]
T: Default,
impl<T: Default> Default for ApiResponse<T> where
T: Default,
[src]
T: Default,
fn default() -> ApiResponse<T>
[src]
impl<'de, T> Deserialize<'de> for ApiResponse<T> where
T: Default,
T: Deserialize<'de>,
T: Default,
[src]
T: Default,
T: Deserialize<'de>,
T: Default,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<T> Display for ApiResponse<T> where
T: Default + Debug + Display,
[src]
T: Default + Debug + Display,
impl<T> Error for ApiResponse<T> where
T: Default + Debug + Display,
[src]
T: Default + Debug + Display,
fn description(&self) -> &str
[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn cause(&self) -> Option<&dyn Error>
1.0.0[src]
impl<T: PartialEq> PartialEq<ApiResponse<T>> for ApiResponse<T> where
T: Default,
[src]
T: Default,
fn eq(&self, other: &ApiResponse<T>) -> bool
[src]
fn ne(&self, other: &ApiResponse<T>) -> bool
[src]
impl<T> StructuralPartialEq for ApiResponse<T> where
T: Default,
[src]
T: Default,
Auto Trait Implementations
impl<T> RefUnwindSafe for ApiResponse<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for ApiResponse<T> where
T: Send,
T: Send,
impl<T> Sync for ApiResponse<T> where
T: Sync,
T: Sync,
impl<T> Unpin for ApiResponse<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for ApiResponse<T> where
T: UnwindSafe,
T: UnwindSafe,
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
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>,