Struct mock_proxy::Mock [−][src]
pub struct Mock { /* fields omitted */ }
Expand description
The struct used to define mock responses
Implementations
Sets the response body to anything with Into<json::JsonValue>
pub fn with_header<K, V>(&mut self, name: K, value: V) -> &mut Self where
K: ToString,
V: ToString,
pub fn with_header<K, V>(&mut self, name: K, value: V) -> &mut Self where
K: ToString,
V: ToString,
Adds a header to the response
Does not remove existing headers with the same name
Sets the response status Default is 200 OK
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Mock
impl UnwindSafe for Mock
Blanket Implementations
Mutably borrows from an owned value. Read more