pub struct MockConfig {
pub id: String,
pub name: String,
pub method: String,
pub path: String,
pub response: MockResponse,
pub enabled: bool,
pub latency_ms: Option<u64>,
pub status_code: Option<u16>,
}Expand description
Mock configuration
Fields§
§id: StringUnique identifier for the mock (auto-generated if empty)
name: StringHuman-readable name for the mock
method: StringHTTP method (GET, POST, PUT, DELETE, etc.)
path: StringURL path pattern (supports path parameters)
response: MockResponseResponse configuration
enabled: boolWhether this mock is currently active
latency_ms: Option<u64>Optional latency to simulate in milliseconds
status_code: Option<u16>HTTP status code to return (default: 200)
Trait Implementations§
Source§impl Clone for MockConfig
impl Clone for MockConfig
Source§fn clone(&self) -> MockConfig
fn clone(&self) -> MockConfig
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 moreSource§impl Debug for MockConfig
impl Debug for MockConfig
Source§impl<'de> Deserialize<'de> for MockConfig
impl<'de> Deserialize<'de> for MockConfig
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 MockConfig
impl RefUnwindSafe for MockConfig
impl Send for MockConfig
impl Sync for MockConfig
impl Unpin for MockConfig
impl UnwindSafe for MockConfig
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