Struct rvk::error::APIError [−][src]
pub struct APIError { /* fields omitted */ }
An error returned by the API
Methods
impl APIError
[src]
impl APIError
pub fn new(code: u64, msg: String) -> APIError
[src]
pub fn new(code: u64, msg: String) -> APIError
Creates a new APIError
pub fn code(&self) -> u64
[src]
pub fn code(&self) -> u64
Returns the code of this APIError
use rvk::error::APIError; let err = APIError::new(0, "test".to_string()); assert_eq!(err.code(), 0);
pub fn msg(&self) -> &String
[src]
pub fn msg(&self) -> &String
Returns the message of this APIError
use rvk::error::APIError; let err = APIError::new(0, "test".to_string()); assert_eq!(err.msg(), "test");
Trait Implementations
impl Debug for APIError
[src]
impl Debug for APIError
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for APIError
[src]
impl Eq for APIError
impl PartialEq for APIError
[src]
impl PartialEq for APIError
fn eq(&self, other: &APIError) -> bool
[src]
fn eq(&self, other: &APIError) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &APIError) -> bool
[src]
fn ne(&self, other: &APIError) -> bool
This method tests for !=
.
impl Clone for APIError
[src]
impl Clone for APIError
fn clone(&self) -> APIError
[src]
fn clone(&self) -> APIError
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Display for APIError
[src]
impl Display for APIError
fn fmt(&self, f: &mut Formatter) -> StdResult<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> StdResult<(), Error>
Formats the value using the given formatter. Read more
impl From<APIError> for Error
[src]
impl From<APIError> for Error