pub enum RouteFaultType {
HttpError {
status_code: u16,
message: Option<String>,
},
ConnectionError {
message: Option<String>,
},
Timeout {
duration_ms: u64,
message: Option<String>,
},
PartialResponse {
truncate_percent: f64,
},
PayloadCorruption {
corruption_type: String,
},
}Expand description
Fault types that can be injected per route
Variants§
HttpError
HTTP error with status code
ConnectionError
Connection error
Timeout
Timeout error
Fields
PartialResponse
Partial response (truncate at percentage)
PayloadCorruption
Payload corruption
Trait Implementations§
Source§impl Clone for RouteFaultType
impl Clone for RouteFaultType
Source§fn clone(&self) -> RouteFaultType
fn clone(&self) -> RouteFaultType
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 RouteFaultType
impl Debug for RouteFaultType
Source§impl<'de> Deserialize<'de> for RouteFaultType
impl<'de> Deserialize<'de> for RouteFaultType
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 RouteFaultType
impl RefUnwindSafe for RouteFaultType
impl Send for RouteFaultType
impl Sync for RouteFaultType
impl Unpin for RouteFaultType
impl UnsafeUnpin for RouteFaultType
impl UnwindSafe for RouteFaultType
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