pub struct HttpJsonResponse { /* private fields */ }Implementations§
Source§impl HttpJsonResponse
impl HttpJsonResponse
pub fn new_message<T: ToString>(msg: T) -> Self
pub fn new_body<T: Serialize>(body: T) -> Result<Self, HttpResponse>
pub fn new_vec_body<T: Serialize>(body: Vec<T>) -> Result<Self, HttpResponse>
pub fn with_code<T: ToString>(&self, code: T) -> Self
pub fn with_code_str(&self, code: &'static str) -> Self
pub fn with_body(&self, body: String) -> Self
pub fn with_serializable_body<T: Serialize>( &self, body: T, ) -> Result<Self, HttpResponse>
Trait Implementations§
Source§impl ComposeSchema for HttpJsonResponse
impl ComposeSchema for HttpJsonResponse
Source§impl Debug for HttpJsonResponse
impl Debug for HttpJsonResponse
Source§impl Display for HttpJsonResponse
impl Display for HttpJsonResponse
Source§impl Serialize for HttpJsonResponse
impl Serialize for HttpJsonResponse
Source§impl<'__r> ToResponse<'__r> for HttpJsonResponse
impl<'__r> ToResponse<'__r> for HttpJsonResponse
Auto Trait Implementations§
impl Freeze for HttpJsonResponse
impl RefUnwindSafe for HttpJsonResponse
impl Send for HttpJsonResponse
impl Sync for HttpJsonResponse
impl Unpin for HttpJsonResponse
impl UnwindSafe for HttpJsonResponse
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