pub struct ErrorDescription { /* private fields */ }Expand description
Simple wrapper around AccessTokenError to imbue the type with addtional json functionality. In addition this enforces backend specific behaviour for obtaining or handling the access error.
Implementations§
Source§impl ErrorDescription
impl ErrorDescription
Sourcepub fn new(error: AccessTokenError) -> Self
pub fn new(error: AccessTokenError) -> Self
Create this from an access token error
Sourcepub fn to_json(&self) -> String
pub fn to_json(&self) -> String
Convert the error into a json string, viable for being sent over a network with
application/json encoding.
Sourcepub fn description(&mut self) -> &mut AccessTokenError
pub fn description(&mut self) -> &mut AccessTokenError
Get a handle to the description the client will receive.
Trait Implementations§
Source§impl Clone for ErrorDescription
impl Clone for ErrorDescription
Source§fn clone(&self) -> ErrorDescription
fn clone(&self) -> ErrorDescription
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for ErrorDescription
impl RefUnwindSafe for ErrorDescription
impl Send for ErrorDescription
impl Sync for ErrorDescription
impl Unpin for ErrorDescription
impl UnwindSafe for ErrorDescription
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