#[non_exhaustive]pub struct HttpFaultDelay {
pub fixed_delay: Option<Duration>,
pub percentage: Option<f64>,
/* private fields */
}Available on crate features
region-url-maps or url-maps only.Expand description
Specifies the delay introduced by the load balancer before forwarding the request to the backend service as part of fault injection.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.fixed_delay: Option<Duration>Specifies the value of the fixed delay interval.
percentage: Option<f64>The percentage of traffic for connections, operations, or requests for which a delay is introduced as part of fault injection.
The value must be from 0.0 to 100.0 inclusive.
Implementations§
Source§impl HttpFaultDelay
impl HttpFaultDelay
pub fn new() -> Self
Sourcepub fn set_fixed_delay<T>(self, v: T) -> Self
pub fn set_fixed_delay<T>(self, v: T) -> Self
Sets the value of fixed_delay.
§Example
ⓘ
use google_cloud_compute_v1::model::Duration;
let x = HttpFaultDelay::new().set_fixed_delay(Duration::default()/* use setters */);Sourcepub fn set_or_clear_fixed_delay<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_fixed_delay<T>(self, v: Option<T>) -> Self
Sets or clears the value of fixed_delay.
§Example
ⓘ
use google_cloud_compute_v1::model::Duration;
let x = HttpFaultDelay::new().set_or_clear_fixed_delay(Some(Duration::default()/* use setters */));
let x = HttpFaultDelay::new().set_or_clear_fixed_delay(None::<Duration>);Sourcepub fn set_percentage<T>(self, v: T) -> Self
pub fn set_percentage<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_percentage<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_percentage<T>(self, v: Option<T>) -> Self
Sets or clears the value of percentage.
§Example
ⓘ
let x = HttpFaultDelay::new().set_or_clear_percentage(Some(42.0));
let x = HttpFaultDelay::new().set_or_clear_percentage(None::<f32>);Trait Implementations§
Source§impl Clone for HttpFaultDelay
impl Clone for HttpFaultDelay
Source§fn clone(&self) -> HttpFaultDelay
fn clone(&self) -> HttpFaultDelay
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 HttpFaultDelay
impl Debug for HttpFaultDelay
Source§impl Default for HttpFaultDelay
impl Default for HttpFaultDelay
Source§fn default() -> HttpFaultDelay
fn default() -> HttpFaultDelay
Returns the “default value” for a type. Read more
Source§impl Message for HttpFaultDelay
impl Message for HttpFaultDelay
Source§impl PartialEq for HttpFaultDelay
impl PartialEq for HttpFaultDelay
impl StructuralPartialEq for HttpFaultDelay
Auto Trait Implementations§
impl Freeze for HttpFaultDelay
impl RefUnwindSafe for HttpFaultDelay
impl Send for HttpFaultDelay
impl Sync for HttpFaultDelay
impl Unpin for HttpFaultDelay
impl UnwindSafe for HttpFaultDelay
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