pub struct FlagPatterns {
pub sdk_patterns: Vec<(String, usize, String)>,
pub env_prefixes: Vec<String>,
pub config_object_heuristics: bool,
}Expand description
User flag patterns from the flags config section that detection
applies during the parse. The default holds the built-in patterns only.
The parse cache keys on these patterns, so every parse that writes the cache must use the patterns of the resolved config.
Fields§
§sdk_patterns: Vec<(String, usize, String)>Extra SDK calls: function name, zero-based name argument, provider label.
env_prefixes: Vec<String>Extra environment variable prefixes.
config_object_heuristics: boolWhether an access on a config object with a flag-like name is a flag.
Implementations§
Source§impl FlagPatterns
impl FlagPatterns
Sourcepub fn is_builtin_only(&self) -> bool
pub fn is_builtin_only(&self) -> bool
Whether no user pattern is present.
Trait Implementations§
Source§impl Clone for FlagPatterns
impl Clone for FlagPatterns
Source§fn clone(&self) -> FlagPatterns
fn clone(&self) -> FlagPatterns
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FlagPatterns
impl Debug for FlagPatterns
Source§impl Default for FlagPatterns
impl Default for FlagPatterns
Source§fn default() -> FlagPatterns
fn default() -> FlagPatterns
Returns the “default value” for a type. Read more
impl Eq for FlagPatterns
Source§impl PartialEq for FlagPatterns
impl PartialEq for FlagPatterns
impl StructuralPartialEq for FlagPatterns
Auto Trait Implementations§
impl Freeze for FlagPatterns
impl RefUnwindSafe for FlagPatterns
impl Send for FlagPatterns
impl Sync for FlagPatterns
impl Unpin for FlagPatterns
impl UnsafeUnpin for FlagPatterns
impl UnwindSafe for FlagPatterns
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more