pub struct HttpResponse {
pub status: i32,
pub body: String,
pub headers: Option<Headers>,
pub flow_control_headers: FlowControlHeaders,
pub local_cache: bool,
}
Expand description
Adapts lower level I/O HTTP/Shell outputs to a common Response.
Fields§
§status: i32
§body: String
§headers: Option<Headers>
Optional headers. Mostly used by HTTP downstream HTTP responses
flow_control_headers: FlowControlHeaders
§local_cache: bool
Implementations§
Source§impl HttpResponse
impl HttpResponse
pub fn builder() -> HttpResponseBuilder
Source§impl HttpResponse
impl HttpResponse
pub fn header(&self, key: &str) -> Option<&str>
pub fn get_page_headers(&self) -> Rc<Option<PageHeader>>
pub fn get_ratelimit_headers(&self) -> Rc<Option<RateLimitHeader>>
pub fn get_flow_control_headers(&self) -> &FlowControlHeaders
pub fn get_etag(&self) -> Option<&str>
pub fn is_ok(&self, method: &Method) -> bool
pub fn update_rate_limit_headers(&mut self, headers: RateLimitHeader)
Trait Implementations§
Source§impl Clone for HttpResponse
impl Clone for HttpResponse
Source§fn clone(&self) -> HttpResponse
fn clone(&self) -> HttpResponse
Returns a duplicate 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 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