#[non_exhaustive]pub enum RolloutError {
Under {
total: u32,
},
Over {
total: u32,
},
Gap {
bucket: u8,
},
Overlap {
bucket: u8,
},
InvalidRange {
rollout: Rollout,
},
}Expand description
Why a rollout set is not a valid traffic split.
Its own type rather than an Error: these are pure
arithmetic checks with no engine involvement, and routing them through the
engine error would attach retryability classification that means nothing
here.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Under
Percentages sum to less than 100. The shortfall matches nothing, so that slice of traffic is silently dropped.
Over
Percentages sum to more than 100. The excess pushes later entries past the end of the bucket space, where they can never match.
Gap
No range in the set serves this bucket — traffic mapping to it matches nothing. Reported at the lowest such bucket.
Overlap
More than one range serves this bucket, so which workflow answers depends on ordering rather than on the rollout. Reported at the lowest such bucket.
InvalidRange
A range is inverted (bucket_end < bucket_start) or reaches past bucket
100. An empty range (bucket_end == bucket_start) is not this — that
is a legitimate 0% entry.
Trait Implementations§
Source§impl Clone for RolloutError
impl Clone for RolloutError
impl Copy for RolloutError
Source§impl Debug for RolloutError
impl Debug for RolloutError
Source§impl Display for RolloutError
impl Display for RolloutError
impl Eq for RolloutError
Source§impl Error for RolloutError
impl Error for RolloutError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for RolloutError
impl PartialEq for RolloutError
impl StructuralPartialEq for RolloutError
Auto Trait Implementations§
impl Freeze for RolloutError
impl RefUnwindSafe for RolloutError
impl Send for RolloutError
impl Sync for RolloutError
impl Unpin for RolloutError
impl UnsafeUnpin for RolloutError
impl UnwindSafe for RolloutError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.