pub struct ProxyResponse {
pub id: RequestId,
pub status: StatusCode,
pub headers: HeaderMap,
pub body: ProxyBody,
pub timestamp: DateTime<Utc>,
pub extensions: Extensions,
}Expand description
A response flowing back through the proxy.
Fields§
§id: RequestId§status: StatusCode§headers: HeaderMap§body: ProxyBody§timestamp: DateTime<Utc>§extensions: ExtensionsImplementations§
Source§impl ProxyResponse
impl ProxyResponse
pub fn new(status: StatusCode) -> Self
pub fn for_request(request_id: RequestId, status: StatusCode) -> Self
pub fn with_body(self, body: impl Into<ProxyBody>) -> Self
pub fn with_headers(self, headers: HeaderMap) -> Self
Trait Implementations§
Source§impl Clone for ProxyResponse
impl Clone for ProxyResponse
Source§fn clone(&self) -> ProxyResponse
fn clone(&self) -> ProxyResponse
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 ProxyResponse
impl !RefUnwindSafe for ProxyResponse
impl Send for ProxyResponse
impl Sync for ProxyResponse
impl Unpin for ProxyResponse
impl UnsafeUnpin for ProxyResponse
impl !UnwindSafe for ProxyResponse
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