Struct graph_error::GraphError
source · pub struct GraphError {
pub headers: Option<GraphHeaders>,
pub code: StatusCode,
pub error_message: ErrorMessage,
pub response_raw: Value,
}
Fields§
§headers: Option<GraphHeaders>
§code: StatusCode
§error_message: ErrorMessage
§response_raw: Value
Contains deserialized JSON response independent of ErrorMessage
Implementations§
source§impl GraphError
impl GraphError
pub fn new( headers: Option<GraphHeaders>, code: StatusCode, error_message: ErrorMessage ) -> GraphError
pub fn set_headers(&mut self, headers: GraphHeaders)
pub fn set_error(&mut self, code: StatusCode) -> Result<(), GraphError>
pub fn set_error_message(&mut self, error_message: ErrorMessage)
pub fn try_set_error_message(&mut self, result: GraphResult<ErrorMessage>)
pub fn message(&self) -> Option<String>
pub fn code_property(&self) -> Option<String>
pub fn inner_error(&self) -> Option<&InnerError>
pub fn request_id(&self) -> Option<String>
pub fn date(&self) -> Option<String>
pub fn detailed_error_code(&self) -> Option<String>
Trait Implementations§
source§impl Clone for GraphError
impl Clone for GraphError
source§fn clone(&self) -> GraphError
fn clone(&self) -> GraphError
Returns a copy of the value. Read more
1.0.0 · 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 GraphError
impl Debug for GraphError
source§impl Default for GraphError
impl Default for GraphError
source§impl<'de> Deserialize<'de> for GraphError
impl<'de> Deserialize<'de> for GraphError
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 Display for GraphError
impl Display for GraphError
source§impl Error for GraphError
impl Error for GraphError
source§fn source<'a>(&'a self) -> Option<&(dyn Error + 'static)>
fn source<'a>(&'a self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<GraphError> for AsyncDownloadError
impl From<GraphError> for AsyncDownloadError
source§fn from(source: GraphError) -> Self
fn from(source: GraphError) -> Self
Converts to this type from the input type.
source§impl From<GraphError> for BlockingDownloadError
impl From<GraphError> for BlockingDownloadError
source§fn from(source: GraphError) -> Self
fn from(source: GraphError) -> Self
Converts to this type from the input type.
source§impl From<GraphError> for GraphFailure
impl From<GraphError> for GraphFailure
source§fn from(source: GraphError) -> Self
fn from(source: GraphError) -> Self
Converts to this type from the input type.
source§impl PartialEq<GraphError> for GraphError
impl PartialEq<GraphError> for GraphError
source§fn eq(&self, other: &GraphError) -> bool
fn eq(&self, other: &GraphError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for GraphError
impl Serialize for GraphError
impl Eq for GraphError
impl StructuralEq for GraphError
impl StructuralPartialEq for GraphError
Auto Trait Implementations§
impl RefUnwindSafe for GraphError
impl Send for GraphError
impl Sync for GraphError
impl Unpin for GraphError
impl UnwindSafe for GraphError
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.