pub struct TestRequest(/* private fields */);
Expand description
Test Request
builder.
Implementations§
source§impl TestRequest
impl TestRequest
sourcepub fn with_uri(path: &str) -> TestRequest
pub fn with_uri(path: &str) -> TestRequest
Create a default TestRequest and then set its URI.
sourcepub fn insert_header(&mut self, header: impl TryIntoHeaderPair) -> &mut Self
pub fn insert_header(&mut self, header: impl TryIntoHeaderPair) -> &mut Self
Insert a header, replacing any that were set with an equivalent field name.
sourcepub fn append_header(&mut self, header: impl TryIntoHeaderPair) -> &mut Self
pub fn append_header(&mut self, header: impl TryIntoHeaderPair) -> &mut Self
Append a header, keeping any that were set with an equivalent field name.
sourcepub fn set_payload(&mut self, data: impl Into<Bytes>) -> &mut Self
pub fn set_payload(&mut self, data: impl Into<Bytes>) -> &mut Self
Set request payload.
pub fn take(&mut self) -> TestRequest
Trait Implementations§
source§impl Default for TestRequest
impl Default for TestRequest
source§fn default() -> TestRequest
fn default() -> TestRequest
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for TestRequest
impl !RefUnwindSafe for TestRequest
impl !Send for TestRequest
impl !Sync for TestRequest
impl Unpin 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