#[non_exhaustive]pub struct PolicyRule {
pub rule: Option<Rule>,
/* private fields */
}
Expand description
Deploy Policy rule.
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.rule: Option<Rule>
Implementations§
Source§impl PolicyRule
impl PolicyRule
pub fn new() -> Self
Sourcepub fn set_rule<T: Into<Option<Rule>>>(self, v: T) -> Self
pub fn set_rule<T: Into<Option<Rule>>>(self, v: T) -> Self
Sets the value of rule.
Note that all the setters affecting rule
are mutually
exclusive.
Sourcepub fn rollout_restriction(&self) -> Option<&Box<RolloutRestriction>>
pub fn rollout_restriction(&self) -> Option<&Box<RolloutRestriction>>
The value of rule
if it holds a RolloutRestriction
, None
if the field is not set or
holds a different branch.
Sourcepub fn set_rollout_restriction<T: Into<Box<RolloutRestriction>>>(
self,
v: T,
) -> Self
pub fn set_rollout_restriction<T: Into<Box<RolloutRestriction>>>( self, v: T, ) -> Self
Sets the value of rule
to hold a RolloutRestriction
.
Note that all the setters affecting rule
are
mutually exclusive.
Trait Implementations§
Source§impl Clone for PolicyRule
impl Clone for PolicyRule
Source§fn clone(&self) -> PolicyRule
fn clone(&self) -> PolicyRule
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 PolicyRule
impl Debug for PolicyRule
Source§impl Default for PolicyRule
impl Default for PolicyRule
Source§fn default() -> PolicyRule
fn default() -> PolicyRule
Returns the “default value” for a type. Read more
Source§impl PartialEq for PolicyRule
impl PartialEq for PolicyRule
impl StructuralPartialEq for PolicyRule
Auto Trait Implementations§
impl Freeze for PolicyRule
impl RefUnwindSafe for PolicyRule
impl Send for PolicyRule
impl Sync for PolicyRule
impl Unpin for PolicyRule
impl UnwindSafe for PolicyRule
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