pub struct MockRoute {
pub path: String,
pub method: String,
pub status: u16,
pub headers: HashMap<String, String>,
pub body: String,
pub body_file: Option<PathBuf>,
pub delay_ms: u64,
}Expand description
Mock route definition.
Fields§
§path: StringRoute path pattern.
method: StringHTTP method (GET, POST, etc.).
status: u16Response status code.
headers: HashMap<String, String>Response headers.
body: StringResponse body.
body_file: Option<PathBuf>Response body file path (alternative to body).
delay_ms: u64Delay in milliseconds before responding.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MockRoute
impl<'de> Deserialize<'de> for MockRoute
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MockRoute
impl RefUnwindSafe for MockRoute
impl Send for MockRoute
impl Sync for MockRoute
impl Unpin for MockRoute
impl UnsafeUnpin for MockRoute
impl UnwindSafe for MockRoute
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