pub struct TargetPolicy {
pub timeout: Option<DurationMs>,
pub retry: Option<RetryPolicy>,
pub breaker: Option<BreakerPolicy>,
pub rate: Option<Rate>,
pub cache: Option<CachePolicy>,
pub idempotency: Option<IdempotencyPolicy>,
pub poll: Option<PollPolicy>,
pub fallback: Option<Vec<String>>,
pub budget: Option<String>,
}Expand description
One target’s policy table. Every layer is optional; a layer set at a more specific level replaces the whole layer table (no deep merge).
Fields§
§timeout: Option<DurationMs>§retry: Option<RetryPolicy>§breaker: Option<BreakerPolicy>§rate: Option<Rate>§cache: Option<CachePolicy>§idempotency: Option<IdempotencyPolicy>§poll: Option<PollPolicy>§fallback: Option<Vec<String>>§budget: Option<String>Trait Implementations§
Source§impl Clone for TargetPolicy
impl Clone for TargetPolicy
Source§fn clone(&self) -> TargetPolicy
fn clone(&self) -> TargetPolicy
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 TargetPolicy
impl Debug for TargetPolicy
Source§impl Default for TargetPolicy
impl Default for TargetPolicy
Source§fn default() -> TargetPolicy
fn default() -> TargetPolicy
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TargetPolicywhere
TargetPolicy: Default,
impl<'de> Deserialize<'de> for TargetPolicywhere
TargetPolicy: Default,
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
Source§impl PartialEq for TargetPolicy
impl PartialEq for TargetPolicy
impl StructuralPartialEq for TargetPolicy
Auto Trait Implementations§
impl Freeze for TargetPolicy
impl RefUnwindSafe for TargetPolicy
impl Send for TargetPolicy
impl Sync for TargetPolicy
impl Unpin for TargetPolicy
impl UnsafeUnpin for TargetPolicy
impl UnwindSafe for TargetPolicy
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