pub struct FlagPolicy {
pub flag_name: Option<String>,
pub commands: Vec<String>,
pub operation: Option<Operation>,
}Expand description
A policy for controlling the value of a flag.
Fields§
§flag_name: Option<String>The name of the flag to enforce this policy on.
Note that this should be the full name of the flag, not the abbreviated name of the flag. If the user specifies the abbreviated name of a flag, that flag will be matched using its full name.
The “no” prefix will not be parsed, so for boolean flags, use the flag’s full name and explicitly set it to true or false.
commands: Vec<String>If set, this flag policy is applied only if one of the given commands or a command that inherits from one of the given commands is being run. For instance, if “build” is one of the commands here, then this policy will apply to any command that inherits from build, such as info, coverage, or test. If empty, this flag policy is applied for all commands. This allows the policy setter to add all policies to the proto without having to determine which Bazel command the user is actually running. Additionally, Bazel allows multiple flags to be defined by the same name, and the specific flag definition is determined by the command.
operation: Option<Operation>Implementations§
Trait Implementations§
Source§impl Clone for FlagPolicy
impl Clone for FlagPolicy
Source§fn clone(&self) -> FlagPolicy
fn clone(&self) -> FlagPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FlagPolicy
impl Debug for FlagPolicy
Source§impl Default for FlagPolicy
impl Default for FlagPolicy
Source§impl Message for FlagPolicy
impl Message for FlagPolicy
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self.Source§impl PartialEq for FlagPolicy
impl PartialEq for FlagPolicy
impl StructuralPartialEq for FlagPolicy
Auto Trait Implementations§
impl Freeze for FlagPolicy
impl RefUnwindSafe for FlagPolicy
impl Send for FlagPolicy
impl Sync for FlagPolicy
impl Unpin for FlagPolicy
impl UnwindSafe for FlagPolicy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request