pub struct CallCtx<'a> {
pub method: &'a str,
pub path: &'a str,
pub headers: &'a HashMap<String, String>,
pub query_params: &'a HashMap<String, Value>,
pub cookies: &'a HashMap<String, String>,
pub body: Option<&'a Value>,
pub content_type: Option<&'a str>,
pub response_var: &'a str,
}Expand description
Context for rendering a single TestClient HTTP call.
response_var is the binding-side identifier the renderer should use when
emitting subsequent assertions (e.g. response, _resp, let response =).
Fields§
§method: &'a str§path: &'a str§headers: &'a HashMap<String, String>§query_params: &'a HashMap<String, Value>§body: Option<&'a Value>§content_type: Option<&'a str>§response_var: &'a strImplementations§
Source§impl<'a> CallCtx<'a>
impl<'a> CallCtx<'a>
pub fn from_request(req: &'a HttpRequest, response_var: &'a str) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for CallCtx<'a>
impl<'a> RefUnwindSafe for CallCtx<'a>
impl<'a> Send for CallCtx<'a>
impl<'a> Sync for CallCtx<'a>
impl<'a> Unpin for CallCtx<'a>
impl<'a> UnsafeUnpin for CallCtx<'a>
impl<'a> UnwindSafe for CallCtx<'a>
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