#[non_exhaustive]pub struct BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy {
pub data: Option<String>,
pub name: Option<String>,
/* private fields */
}Available on crate features
backend-services or region-backend-services only.Expand description
The configuration for a custom policy implemented by the user and deployed with the client.
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.data: Option<String>An optional, arbitrary JSON object with configuration data, understood by a locally installed custom policy implementation.
name: Option<String>Identifies the custom policy.
The value should match the name of a custom implementation registered on the gRPC clients. It should follow protocol buffer message naming conventions and include the full path (for example, myorg.CustomLbPolicy). The maximum length is 256 characters.
Do not specify the same custom policy more than once for a backend. If you do, the configuration is rejected.
For an example of how to use this field, seeUse a custom policy.
Implementations§
Source§impl BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy
impl BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy
Trait Implementations§
Source§impl Clone for BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy
impl Clone for BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy
Source§fn clone(&self) -> BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy
fn clone(&self) -> BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy
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 BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy
impl Default for BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy
Source§fn default() -> BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy
fn default() -> BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy
Returns the “default value” for a type. Read more
Source§impl PartialEq for BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy
impl PartialEq for BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy
Source§fn eq(
&self,
other: &BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy,
) -> bool
fn eq( &self, other: &BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy, ) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy
Auto Trait Implementations§
impl Freeze for BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy
impl RefUnwindSafe for BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy
impl Send for BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy
impl Sync for BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy
impl Unpin for BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy
impl UnwindSafe for BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy
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