#[non_exhaustive]pub struct ReferenceRules {
pub operators: OperatorSet,
pub single_quotes: bool,
pub escaped_dollar: bool,
pub commands: bool,
pub backtick_quotes: bool,
}Expand description
Caller-selected rules for deciding whether a raw candidate could expand.
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.operators: OperatorSetVariable forms and operators considered eligible.
single_quotes: boolWhether references inside single-quoted values are eligible.
escaped_dollar: boolWhether escaped-dollar candidates are eligible.
commands: boolWhether $(command) candidates are eligible.
backtick_quotes: boolWhether references inside backtick-quoted values are eligible.
Implementations§
Source§impl ReferenceRules
impl ReferenceRules
Sourcepub const fn with_operators(self, value: OperatorSet) -> Self
pub const fn with_operators(self, value: OperatorSet) -> Self
Use the given variable/operator eligibility set.
Sourcepub const fn with_single_quotes(self, value: bool) -> Self
pub const fn with_single_quotes(self, value: bool) -> Self
Enable or disable references inside single quotes.
Sourcepub const fn with_escaped_dollar(self, value: bool) -> Self
pub const fn with_escaped_dollar(self, value: bool) -> Self
Enable or disable escaped-dollar candidates.
Sourcepub const fn with_commands(self, value: bool) -> Self
pub const fn with_commands(self, value: bool) -> Self
Enable or disable command candidates.
Sourcepub const fn with_backtick_quotes(self, value: bool) -> Self
pub const fn with_backtick_quotes(self, value: bool) -> Self
Enable or disable references inside backticks.
Source§impl ReferenceRules
impl ReferenceRules
Sourcepub const PORTABLE: Self
pub const PORTABLE: Self
Conservative Portable rules: basic variables only, no quotes or commands.
Sourcepub const DOTENV_EXPAND: Self
pub const DOTENV_EXPAND: Self
dotenv-expand-style variables, single quotes and command substitution.
Trait Implementations§
Source§impl Clone for ReferenceRules
impl Clone for ReferenceRules
impl Copy for ReferenceRules
Source§impl Debug for ReferenceRules
impl Debug for ReferenceRules
Source§impl Default for ReferenceRules
impl Default for ReferenceRules
impl Eq for ReferenceRules
Source§impl Hash for ReferenceRules
impl Hash for ReferenceRules
Source§impl PartialEq for ReferenceRules
impl PartialEq for ReferenceRules
impl StructuralPartialEq for ReferenceRules
Auto Trait Implementations§
impl Freeze for ReferenceRules
impl RefUnwindSafe for ReferenceRules
impl Send for ReferenceRules
impl Sync for ReferenceRules
impl Unpin for ReferenceRules
impl UnsafeUnpin for ReferenceRules
impl UnwindSafe for ReferenceRules
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