#[non_exhaustive]pub struct PlacementPolicy {
pub type: Type,
pub tpu_topology: String,
pub policy_name: String,
/* private fields */
}Expand description
PlacementPolicy defines the placement policy used by the node pool.
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.type: TypeThe type of placement.
tpu_topology: StringOptional. TPU placement topology for pod slice node pool. https://cloud.google.com/tpu/docs/types-topologies#tpu_topologies
policy_name: StringIf set, refers to the name of a custom resource policy supplied by the user. The resource policy must be in the same project and region as the node pool. If not found, InvalidArgument error is returned.
Implementations§
Source§impl PlacementPolicy
impl PlacementPolicy
pub fn new() -> Self
Sourcepub fn set_tpu_topology<T: Into<String>>(self, v: T) -> Self
pub fn set_tpu_topology<T: Into<String>>(self, v: T) -> Self
Sets the value of tpu_topology.
§Example
ⓘ
let x = PlacementPolicy::new().set_tpu_topology("example");Sourcepub fn set_policy_name<T: Into<String>>(self, v: T) -> Self
pub fn set_policy_name<T: Into<String>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for PlacementPolicy
impl Clone for PlacementPolicy
Source§fn clone(&self) -> PlacementPolicy
fn clone(&self) -> PlacementPolicy
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 PlacementPolicy
impl Debug for PlacementPolicy
Source§impl Default for PlacementPolicy
impl Default for PlacementPolicy
Source§fn default() -> PlacementPolicy
fn default() -> PlacementPolicy
Returns the “default value” for a type. Read more
Source§impl Message for PlacementPolicy
impl Message for PlacementPolicy
Source§impl PartialEq for PlacementPolicy
impl PartialEq for PlacementPolicy
impl StructuralPartialEq for PlacementPolicy
Auto Trait Implementations§
impl Freeze for PlacementPolicy
impl RefUnwindSafe for PlacementPolicy
impl Send for PlacementPolicy
impl Sync for PlacementPolicy
impl Unpin for PlacementPolicy
impl UnwindSafe for PlacementPolicy
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