pub struct MockHttpRequest { /* private fields */ }
Implementations§
Source§impl MockHttpRequest
impl MockHttpRequest
pub fn new(res: Response<Vec<u8>>) -> Self
pub fn empty() -> Self
pub fn from_request_cell(request: Rc<RefCell<Vec<Request<Body>>>>) -> Self
pub fn get_request_cell(&self) -> Rc<RefCell<Vec<Request<Body>>>>
pub fn add_response(&mut self, res: Response<Vec<u8>>)
pub fn add_error(&mut self, error: Error)
pub fn assert_method(&self, method: &Method)
pub fn assert_uri(&self, uri: &str)
pub fn assert_header(&self, key: &str, value: &str)
pub async fn assert_body(&self, body: &[u8])
pub async fn assert_body_str(&self, body: &str)
Trait Implementations§
Source§impl Debug for MockHttpRequest
impl Debug for MockHttpRequest
Source§impl Default for MockHttpRequest
impl Default for MockHttpRequest
Source§fn default() -> MockHttpRequest
fn default() -> MockHttpRequest
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MockHttpRequest
impl !RefUnwindSafe for MockHttpRequest
impl !Send for MockHttpRequest
impl !Sync for MockHttpRequest
impl Unpin for MockHttpRequest
impl !UnwindSafe for MockHttpRequest
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