Struct makepad_widgets::HttpResponse
pub struct HttpResponse {
pub metadata_id: LiveId,
pub status_code: u16,
pub headers: BTreeMap<String, Vec<String, Global>, Global>,
pub body: Option<Vec<u8, Global>>,
}
Fields§
§metadata_id: LiveId
§status_code: u16
§headers: BTreeMap<String, Vec<String, Global>, Global>
§body: Option<Vec<u8, Global>>
Implementations§
§impl HttpResponse
impl HttpResponse
pub fn new( metadata_id: LiveId, status_code: u16, string_headers: String, body: Option<Vec<u8, Global>> ) -> HttpResponse
pub fn set_header(&mut self, name: String, value: String)
pub fn get_body(&self) -> Option<&Vec<u8, Global>>
pub fn get_string_body(&self) -> Option<String>
pub fn get_json_body<T>(&self) -> Result<T, DeJsonErr>where T: DeJson,
Trait Implementations§
§impl Clone for HttpResponse
impl Clone for HttpResponse
§fn clone(&self) -> HttpResponse
fn clone(&self) -> HttpResponse
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 moreAuto Trait Implementations§
impl RefUnwindSafe for HttpResponse
impl Send for HttpResponse
impl Sync for HttpResponse
impl Unpin for HttpResponse
impl UnwindSafe for HttpResponse
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