Struct ic_http_certification::http::HttpResponse
source · pub struct HttpResponse {
pub status_code: u16,
pub headers: Vec<HeaderField>,
pub body: Vec<u8>,
pub upgrade: Option<bool>,
}
Expand description
A Candid-encodable representation of an HTTP response. This struct is used by canisters that implement the HTTP interface required by the HTTP Gateway Protocol.
Fields§
§status_code: u16
HTTP response status code.
headers: Vec<HeaderField>
HTTP response headers.
body: Vec<u8>
Response body as an array of bytes.
upgrade: Option<bool>
Whether the request should be upgraded to an update call.
Trait Implementations§
source§impl CandidType for HttpResponse
impl CandidType for HttpResponse
source§impl Clone for HttpResponse
impl Clone for HttpResponse
source§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 moresource§impl Debug for HttpResponse
impl Debug for HttpResponse
source§impl<'de> Deserialize<'de> for HttpResponse
impl<'de> Deserialize<'de> for HttpResponse
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
source§impl PartialEq for HttpResponse
impl PartialEq for HttpResponse
source§fn eq(&self, other: &HttpResponse) -> bool
fn eq(&self, other: &HttpResponse) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for HttpResponse
impl StructuralPartialEq for HttpResponse
Auto Trait Implementations§
impl Freeze for HttpResponse
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