pub struct ApiResponseBody<T> {
pub was_successful: bool,
pub data: Option<T>,
pub message: Option<String>,
}Fields§
§was_successful: bool§data: Option<T>§message: Option<String>Implementations§
Source§impl ApiResponseBody<Value>
impl ApiResponseBody<Value>
Sourcepub fn into_json_body(self) -> String
pub fn into_json_body(self) -> String
Parse an [ApiResponse] into a JSON body string.
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for ApiResponseBody<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for ApiResponseBody<T>where
T: Deserialize<'de>,
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
Auto Trait Implementations§
impl<T> Freeze for ApiResponseBody<T>where
T: Freeze,
impl<T> RefUnwindSafe for ApiResponseBody<T>where
T: RefUnwindSafe,
impl<T> Send for ApiResponseBody<T>where
T: Send,
impl<T> Sync for ApiResponseBody<T>where
T: Sync,
impl<T> Unpin for ApiResponseBody<T>where
T: Unpin,
impl<T> UnsafeUnpin for ApiResponseBody<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ApiResponseBody<T>where
T: UnwindSafe,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<B> IntoFunctionResponse<B, Body> for Bwhere
B: Serialize,
impl<B> IntoFunctionResponse<B, Body> for Bwhere
B: Serialize,
Source§fn into_response(self) -> FunctionResponse<B, Body>
fn into_response(self) -> FunctionResponse<B, Body>
Convert the type into a FunctionResponse.