pub enum IndexingPolicy {
Auto,
Disabled,
}Expand description
Escape hatch for IndexingTracker’s readiness gate, configured per
server via LspServerConfig::indexing.
Disabled pins IndexingTracker::state at IndexingState::Unknown
unconditionally – the same fail-open path a server that has simply never
sent a recognized signal already takes – rather than adding a new branch
to the gate itself. Exists for a server whose $/progress/serverStatus
shape doesn’t fit this tracker’s assumptions (Accepted cost 1/3 in the
design): per-server granularity is enough, since Error::WorkspaceIndexing
already names the offending server_id.
§Examples
use mcpls_core::bridge::IndexingPolicy;
assert_eq!(IndexingPolicy::default(), IndexingPolicy::Auto);
let json = serde_json::to_string(&IndexingPolicy::Disabled).unwrap();
assert_eq!(json, "\"disabled\"");Variants§
Auto
Track readiness normally from whatever signals the server sends.
Disabled
Never gate on this server; indexing_state always reads Unknown.
Trait Implementations§
Source§impl Clone for IndexingPolicy
impl Clone for IndexingPolicy
impl Copy for IndexingPolicy
Source§impl Debug for IndexingPolicy
impl Debug for IndexingPolicy
Source§impl Default for IndexingPolicy
impl Default for IndexingPolicy
Source§impl<'de> Deserialize<'de> for IndexingPolicy
impl<'de> Deserialize<'de> for IndexingPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for IndexingPolicy
Source§impl PartialEq for IndexingPolicy
impl PartialEq for IndexingPolicy
Source§impl Serialize for IndexingPolicy
impl Serialize for IndexingPolicy
impl StructuralPartialEq for IndexingPolicy
Auto Trait Implementations§
impl Freeze for IndexingPolicy
impl RefUnwindSafe for IndexingPolicy
impl Send for IndexingPolicy
impl Sync for IndexingPolicy
impl Unpin for IndexingPolicy
impl UnsafeUnpin for IndexingPolicy
impl UnwindSafe for IndexingPolicy
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.