pub enum FeatureProfile {
GaLock,
Production,
All,
}Expand description
Known feature profiles for runtime capability selection.
Variants§
GaLock
Conservative GA-lock set (legacy compatibility mode).
Production
Standard production profile used for normal runtime operation.
All
All in-tree capabilities, useful for test matrices and snapshots.
Implementations§
Source§impl FeatureProfile
impl FeatureProfile
Sourcepub const fn from_kind(profile: FeatureProfileKind) -> FeatureProfile
pub const fn from_kind(profile: FeatureProfileKind) -> FeatureProfile
Convert canonical profile IDs to FeatureProfile values.
Sourcepub const fn from_ga_lock_enabled(ga_lock_enabled: bool) -> FeatureProfile
pub const fn from_ga_lock_enabled(ga_lock_enabled: bool) -> FeatureProfile
Build the profile from an explicit GA-lock toggle.
Sourcepub const fn current() -> FeatureProfile
pub const fn current() -> FeatureProfile
Resolve the active policy from compiled crate features.
This keeps all consumers using a single profile source and reduces
duplication where capability selection previously hardcoded
cfg!(feature = "lsp-ga-lock") at each call-site.
Sourcepub fn from_cli_argument(raw_profile: &str) -> FeatureProfile
pub fn from_cli_argument(raw_profile: &str) -> FeatureProfile
Resolve a user-provided profile, falling back to current() on invalid input.
This API is intended for CLI and editor integration where users may provide explicit profile controls at runtime.
Sourcepub fn parse_profile(raw_profile: &str) -> Option<FeatureProfile>
pub fn parse_profile(raw_profile: &str) -> Option<FeatureProfile>
Parse a CLI argument using the same normalization rules as editor and CLI inputs.
Sourcepub fn build_flags(self) -> BuildFlags
pub fn build_flags(self) -> BuildFlags
Convert this policy into base BuildFlags.
Sourcepub fn runtime_flags(self, has_perltidy: bool) -> BuildFlags
pub fn runtime_flags(self, has_perltidy: bool) -> BuildFlags
Convert this policy into runtime BuildFlags that include
per-tool availability effects.
Sourcepub fn advertised_features(self) -> AdvertisedFeatures
pub fn advertised_features(self) -> AdvertisedFeatures
Convert this policy into server advertised features.
Sourcepub fn runtime_advertised_features(
self,
has_perltidy: bool,
) -> AdvertisedFeatures
pub fn runtime_advertised_features( self, has_perltidy: bool, ) -> AdvertisedFeatures
Convert this policy into advertised features with runtime tooling checks.
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
Return the user-facing CLI/profile display label for this profile.
Sourcepub const fn supported_cli_profiles() -> &'static [&'static str]
pub const fn supported_cli_profiles() -> &'static [&'static str]
Return every supported CLI token accepted by FeatureProfile::parse_profile.
Sourcepub const fn all() -> &'static [FeatureProfile]
pub const fn all() -> &'static [FeatureProfile]
Return all canonical profiles in declaration order.
Trait Implementations§
Source§impl Clone for FeatureProfile
impl Clone for FeatureProfile
Source§fn clone(&self) -> FeatureProfile
fn clone(&self) -> FeatureProfile
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more