pub struct ContractTestConfig {
pub validate_requests: bool,
pub validate_responses: bool,
pub detect_breaking_changes: bool,
pub generate_mocks: bool,
pub fail_fast: bool,
}Expand description
Contract testing configuration
Fields§
§validate_requests: boolValidate request schemas
validate_responses: boolValidate response schemas
detect_breaking_changes: boolDetect breaking changes
generate_mocks: boolGenerate mock responses
fail_fast: boolFail on first error
Implementations§
Source§impl ContractTestConfig
impl ContractTestConfig
Sourcepub fn new() -> ContractTestConfig
pub fn new() -> ContractTestConfig
Create a new configuration with defaults
Sourcepub fn validate_requests(self, enable: bool) -> ContractTestConfig
pub fn validate_requests(self, enable: bool) -> ContractTestConfig
Enable request validation
Sourcepub fn validate_responses(self, enable: bool) -> ContractTestConfig
pub fn validate_responses(self, enable: bool) -> ContractTestConfig
Enable response validation
Sourcepub fn detect_breaking_changes(self, enable: bool) -> ContractTestConfig
pub fn detect_breaking_changes(self, enable: bool) -> ContractTestConfig
Enable breaking change detection
Sourcepub fn generate_mocks(self, enable: bool) -> ContractTestConfig
pub fn generate_mocks(self, enable: bool) -> ContractTestConfig
Enable mock generation
Sourcepub fn fail_fast(self, enable: bool) -> ContractTestConfig
pub fn fail_fast(self, enable: bool) -> ContractTestConfig
Enable fail-fast mode
Trait Implementations§
Source§impl Clone for ContractTestConfig
impl Clone for ContractTestConfig
Source§fn clone(&self) -> ContractTestConfig
fn clone(&self) -> ContractTestConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ContractTestConfig
impl Debug for ContractTestConfig
Source§impl Default for ContractTestConfig
impl Default for ContractTestConfig
Source§fn default() -> ContractTestConfig
fn default() -> ContractTestConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Forget for ContractTestConfig
impl Freeze for ContractTestConfig
impl Move for ContractTestConfig
impl RefUnwindSafe for ContractTestConfig
impl Send for ContractTestConfig
impl Sync for ContractTestConfig
impl Unpin for ContractTestConfig
impl UnsafeUnpin for ContractTestConfig
impl UnwindSafe for ContractTestConfig
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