#[non_exhaustive]pub struct BackendServiceLocalityLoadBalancingPolicyConfig {
pub custom_policy: Option<BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy>,
pub policy: Option<BackendServiceLocalityLoadBalancingPolicyConfigPolicy>,
/* private fields */
}Available on crate features
backend-services or region-backend-services only.Expand description
Container for either a built-in LB policy supported by gRPC or Envoy or a custom one implemented by the end user.
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.custom_policy: Option<BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy>§policy: Option<BackendServiceLocalityLoadBalancingPolicyConfigPolicy>Implementations§
Source§impl BackendServiceLocalityLoadBalancingPolicyConfig
impl BackendServiceLocalityLoadBalancingPolicyConfig
pub fn new() -> Self
Sourcepub fn set_custom_policy<T>(self, v: T) -> Self
pub fn set_custom_policy<T>(self, v: T) -> Self
Sets the value of custom_policy.
§Example
ⓘ
use google_cloud_compute_v1::model::BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy;
let x = BackendServiceLocalityLoadBalancingPolicyConfig::new().set_custom_policy(BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy::default()/* use setters */);Sourcepub fn set_or_clear_custom_policy<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_custom_policy<T>(self, v: Option<T>) -> Self
Sets or clears the value of custom_policy.
§Example
ⓘ
use google_cloud_compute_v1::model::BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy;
let x = BackendServiceLocalityLoadBalancingPolicyConfig::new().set_or_clear_custom_policy(Some(BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy::default()/* use setters */));
let x = BackendServiceLocalityLoadBalancingPolicyConfig::new().set_or_clear_custom_policy(None::<BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy>);Sourcepub fn set_policy<T>(self, v: T) -> Self
pub fn set_policy<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_policy<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_policy<T>(self, v: Option<T>) -> Self
Sets or clears the value of policy.
§Example
ⓘ
use google_cloud_compute_v1::model::BackendServiceLocalityLoadBalancingPolicyConfigPolicy;
let x = BackendServiceLocalityLoadBalancingPolicyConfig::new().set_or_clear_policy(Some(BackendServiceLocalityLoadBalancingPolicyConfigPolicy::default()/* use setters */));
let x = BackendServiceLocalityLoadBalancingPolicyConfig::new().set_or_clear_policy(None::<BackendServiceLocalityLoadBalancingPolicyConfigPolicy>);Trait Implementations§
Source§impl Clone for BackendServiceLocalityLoadBalancingPolicyConfig
impl Clone for BackendServiceLocalityLoadBalancingPolicyConfig
Source§fn clone(&self) -> BackendServiceLocalityLoadBalancingPolicyConfig
fn clone(&self) -> BackendServiceLocalityLoadBalancingPolicyConfig
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 Default for BackendServiceLocalityLoadBalancingPolicyConfig
impl Default for BackendServiceLocalityLoadBalancingPolicyConfig
Source§fn default() -> BackendServiceLocalityLoadBalancingPolicyConfig
fn default() -> BackendServiceLocalityLoadBalancingPolicyConfig
Returns the “default value” for a type. Read more
Source§impl PartialEq for BackendServiceLocalityLoadBalancingPolicyConfig
impl PartialEq for BackendServiceLocalityLoadBalancingPolicyConfig
Source§fn eq(&self, other: &BackendServiceLocalityLoadBalancingPolicyConfig) -> bool
fn eq(&self, other: &BackendServiceLocalityLoadBalancingPolicyConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BackendServiceLocalityLoadBalancingPolicyConfig
Auto Trait Implementations§
impl Freeze for BackendServiceLocalityLoadBalancingPolicyConfig
impl RefUnwindSafe for BackendServiceLocalityLoadBalancingPolicyConfig
impl Send for BackendServiceLocalityLoadBalancingPolicyConfig
impl Sync for BackendServiceLocalityLoadBalancingPolicyConfig
impl Unpin for BackendServiceLocalityLoadBalancingPolicyConfig
impl UnwindSafe for BackendServiceLocalityLoadBalancingPolicyConfig
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