pub struct TestRequest { /* private fields */ }Implementations§
Source§impl TestRequest
impl TestRequest
pub fn new(method: Method, path: impl Into<String>) -> Self
pub fn get(path: impl Into<String>) -> Self
pub fn post(path: impl Into<String>) -> Self
pub fn put(path: impl Into<String>) -> Self
pub fn delete(path: impl Into<String>) -> Self
pub fn patch(path: impl Into<String>) -> Self
pub fn header(self, name: impl Into<String>, value: impl Into<String>) -> Self
pub fn body(self, body: impl Into<Bytes>) -> Self
pub fn text(self, body: impl Into<String>) -> Self
pub fn json<T: Serialize>(self, payload: &T) -> Result<Self, TestHarnessError>
Trait Implementations§
Source§impl Clone for TestRequest
impl Clone for TestRequest
Source§fn clone(&self) -> TestRequest
fn clone(&self) -> TestRequest
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 TestRequest
impl RefUnwindSafe for TestRequest
impl Send for TestRequest
impl Sync for TestRequest
impl Unpin for TestRequest
impl UnsafeUnpin for TestRequest
impl UnwindSafe for TestRequest
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