pub struct CanaryDeployment {
pub revision_id: RevisionId,
pub fraction: f64,
}Expand description
A canary binding on a deployment pointer: one revision bound to a
declared fraction of new runs while active serves the rest — the
crate::learn::CanaryBinding shape with a revision in the slot.
Fields§
§revision_id: RevisionIdThe canaried revision.
fraction: f64The fraction of new runs the revision serves, in (0, 1].
Implementations§
Source§impl CanaryDeployment
impl CanaryDeployment
Sourcepub fn new(revision_id: RevisionId, fraction: f64) -> Result<Self, DeployError>
pub fn new(revision_id: RevisionId, fraction: f64) -> Result<Self, DeployError>
Declare a canary. Fractions outside (0, 1] are refused: zero
binds nothing (a cleared slot says that), and above one is not a
fraction.
Trait Implementations§
Source§impl Clone for CanaryDeployment
impl Clone for CanaryDeployment
Source§impl Debug for CanaryDeployment
impl Debug for CanaryDeployment
Source§impl<'de> Deserialize<'de> for CanaryDeployment
impl<'de> Deserialize<'de> for CanaryDeployment
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 CanaryDeployment
impl PartialEq for CanaryDeployment
Source§impl Serialize for CanaryDeployment
impl Serialize for CanaryDeployment
impl StructuralPartialEq for CanaryDeployment
Auto Trait Implementations§
impl Freeze for CanaryDeployment
impl RefUnwindSafe for CanaryDeployment
impl Send for CanaryDeployment
impl Sync for CanaryDeployment
impl Unpin for CanaryDeployment
impl UnsafeUnpin for CanaryDeployment
impl UnwindSafe for CanaryDeployment
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