#[non_exhaustive]pub struct Control {
pub environment: String,
pub method_policies: Vec<MethodPolicy>,
/* private fields */
}
Expand description
Selects and configures the service controller used by the service.
Example:
control:
environment: servicecontrol.googleapis.com
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.environment: String
The service controller environment to use. If empty, no control plane feature (like quota and billing) will be enabled. The recommended value for most services is servicecontrol.googleapis.com
method_policies: Vec<MethodPolicy>
Defines policies applying to the API methods of the service.
Implementations§
Source§impl Control
impl Control
pub fn new() -> Self
Sourcepub fn set_environment<T: Into<String>>(self, v: T) -> Self
pub fn set_environment<T: Into<String>>(self, v: T) -> Self
Sets the value of environment.
Sourcepub fn set_method_policies<T, V>(self, v: T) -> Self
pub fn set_method_policies<T, V>(self, v: T) -> Self
Sets the value of method_policies.
Trait Implementations§
impl StructuralPartialEq for Control
Auto Trait Implementations§
impl Freeze for Control
impl RefUnwindSafe for Control
impl Send for Control
impl Sync for Control
impl Unpin for Control
impl UnwindSafe for Control
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