#[non_exhaustive]pub struct Canary {
pub runtime_config: Option<RuntimeConfig>,
pub mode: Option<Mode>,
/* private fields */
}Expand description
Canary represents the canary deployment strategy.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.runtime_config: Option<RuntimeConfig>Optional. Runtime specific configurations for the deployment strategy. The runtime configuration is used to determine how Cloud Deploy will split traffic to enable a progressive deployment.
mode: Option<Mode>The mode to use for the canary deployment strategy.
Implementations§
Source§impl Canary
impl Canary
Sourcepub fn set_runtime_config<T>(self, v: T) -> Selfwhere
T: Into<RuntimeConfig>,
pub fn set_runtime_config<T>(self, v: T) -> Selfwhere
T: Into<RuntimeConfig>,
Sets the value of runtime_config.
§Example
use google_cloud_deploy_v1::model::RuntimeConfig;
let x = Canary::new().set_runtime_config(RuntimeConfig::default()/* use setters */);Sourcepub fn set_or_clear_runtime_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<RuntimeConfig>,
pub fn set_or_clear_runtime_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<RuntimeConfig>,
Sets or clears the value of runtime_config.
§Example
use google_cloud_deploy_v1::model::RuntimeConfig;
let x = Canary::new().set_or_clear_runtime_config(Some(RuntimeConfig::default()/* use setters */));
let x = Canary::new().set_or_clear_runtime_config(None::<RuntimeConfig>);Sourcepub fn canary_deployment(&self) -> Option<&Box<CanaryDeployment>>
pub fn canary_deployment(&self) -> Option<&Box<CanaryDeployment>>
The value of mode
if it holds a CanaryDeployment, None if the field is not set or
holds a different branch.
Sourcepub fn set_canary_deployment<T: Into<Box<CanaryDeployment>>>(self, v: T) -> Self
pub fn set_canary_deployment<T: Into<Box<CanaryDeployment>>>(self, v: T) -> Self
Sets the value of mode
to hold a CanaryDeployment.
Note that all the setters affecting mode are
mutually exclusive.
§Example
use google_cloud_deploy_v1::model::CanaryDeployment;
let x = Canary::new().set_canary_deployment(CanaryDeployment::default()/* use setters */);
assert!(x.canary_deployment().is_some());
assert!(x.custom_canary_deployment().is_none());Sourcepub fn custom_canary_deployment(&self) -> Option<&Box<CustomCanaryDeployment>>
pub fn custom_canary_deployment(&self) -> Option<&Box<CustomCanaryDeployment>>
The value of mode
if it holds a CustomCanaryDeployment, None if the field is not set or
holds a different branch.
Sourcepub fn set_custom_canary_deployment<T: Into<Box<CustomCanaryDeployment>>>(
self,
v: T,
) -> Self
pub fn set_custom_canary_deployment<T: Into<Box<CustomCanaryDeployment>>>( self, v: T, ) -> Self
Sets the value of mode
to hold a CustomCanaryDeployment.
Note that all the setters affecting mode are
mutually exclusive.
§Example
use google_cloud_deploy_v1::model::CustomCanaryDeployment;
let x = Canary::new().set_custom_canary_deployment(CustomCanaryDeployment::default()/* use setters */);
assert!(x.custom_canary_deployment().is_some());
assert!(x.canary_deployment().is_none());Trait Implementations§
impl StructuralPartialEq for Canary
Auto Trait Implementations§
impl Freeze for Canary
impl RefUnwindSafe for Canary
impl Send for Canary
impl Sync for Canary
impl Unpin for Canary
impl UnsafeUnpin for Canary
impl UnwindSafe for Canary
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request