pub struct ClosePreparationError {
pub error: String,
pub reason: String,
pub status: u16,
pub extra: Option<Map<String, Value>>,
}Expand description
HTTP-friendly error for close preparation.
Fields§
§error: String§reason: String§status: u16§extra: Option<Map<String, Value>>Implementations§
Source§impl ClosePreparationError
impl ClosePreparationError
pub fn to_json(&self) -> String
pub fn bad_request(reason: impl Into<String>) -> Self
pub fn payment_required(reason: impl Into<String>) -> Self
pub fn not_found(reason: impl Into<String>) -> Self
pub fn internal(reason: impl Into<String>) -> Self
pub fn conflict(reason: impl Into<String>) -> Self
pub fn gone(reason: impl Into<String>) -> Self
pub fn with_extra(self, extra: Map<String, Value>) -> Self
pub fn from_bridge_error(err: BridgeError) -> Self
Trait Implementations§
Source§impl Clone for ClosePreparationError
impl Clone for ClosePreparationError
Source§fn clone(&self) -> ClosePreparationError
fn clone(&self) -> ClosePreparationError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ClosePreparationError
impl Debug for ClosePreparationError
Auto Trait Implementations§
impl Freeze for ClosePreparationError
impl RefUnwindSafe for ClosePreparationError
impl Send for ClosePreparationError
impl Sync for ClosePreparationError
impl Unpin for ClosePreparationError
impl UnsafeUnpin for ClosePreparationError
impl UnwindSafe for ClosePreparationError
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