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.
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for FeatureProfile
Source§impl Debug for FeatureProfile
impl Debug for FeatureProfile
impl Eq for FeatureProfile
Source§impl PartialEq for FeatureProfile
impl PartialEq for FeatureProfile
Source§fn eq(&self, other: &FeatureProfile) -> bool
fn eq(&self, other: &FeatureProfile) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FeatureProfile
Auto Trait Implementations§
impl Freeze for FeatureProfile
impl RefUnwindSafe for FeatureProfile
impl Send for FeatureProfile
impl Sync for FeatureProfile
impl Unpin for FeatureProfile
impl UnsafeUnpin for FeatureProfile
impl UnwindSafe for FeatureProfile
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<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
key and return true if they are equal.