#[non_exhaustive]pub struct DeploymentUnit {
pub id: String,
pub deployment: Option<String>,
pub dependencies: Vec<String>,
/* private fields */
}Expand description
A DeploymentUnit is a container for a deployment and its dependencies.
An existing deployment can be provided directly in the unit, or the unit
can act as a placeholder to define the DAG, with the deployment specs
supplied in a provisionDeploymentRequest.
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.id: StringThe id of the deployment unit. Must be unique within the deployment group.
deployment: Option<String>Optional. The name of the deployment to be provisioned. Format: ‘projects/{project_id}/locations/{location}/deployments/{deployment}’.
dependencies: Vec<String>Required. The IDs of the deployment units within the deployment group that this unit depends on.
Implementations§
Source§impl DeploymentUnit
impl DeploymentUnit
pub fn new() -> Self
Sourcepub fn set_deployment<T>(self, v: T) -> Self
pub fn set_deployment<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_deployment<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_deployment<T>(self, v: Option<T>) -> Self
Sets or clears the value of deployment.
§Example
ⓘ
let x = DeploymentUnit::new().set_or_clear_deployment(Some("example"));
let x = DeploymentUnit::new().set_or_clear_deployment(None::<String>);Sourcepub fn set_dependencies<T, V>(self, v: T) -> Self
pub fn set_dependencies<T, V>(self, v: T) -> Self
Sets the value of dependencies.
§Example
ⓘ
let x = DeploymentUnit::new().set_dependencies(["a", "b", "c"]);Trait Implementations§
Source§impl Clone for DeploymentUnit
impl Clone for DeploymentUnit
Source§fn clone(&self) -> DeploymentUnit
fn clone(&self) -> DeploymentUnit
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 DeploymentUnit
impl Debug for DeploymentUnit
Source§impl Default for DeploymentUnit
impl Default for DeploymentUnit
Source§fn default() -> DeploymentUnit
fn default() -> DeploymentUnit
Returns the “default value” for a type. Read more
Source§impl Message for DeploymentUnit
impl Message for DeploymentUnit
Source§impl PartialEq for DeploymentUnit
impl PartialEq for DeploymentUnit
impl StructuralPartialEq for DeploymentUnit
Auto Trait Implementations§
impl Freeze for DeploymentUnit
impl RefUnwindSafe for DeploymentUnit
impl Send for DeploymentUnit
impl Sync for DeploymentUnit
impl Unpin for DeploymentUnit
impl UnsafeUnpin for DeploymentUnit
impl UnwindSafe for DeploymentUnit
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