pub enum ServerSelection {
Explicit,
Auto,
}Expand description
Whether mcpls may replace a server entry’s command and args at startup.
Records provenance and consent, not the chosen server: only the generated
default TypeScript entry carries Self::Auto, so a hand-written entry
is never rewritten.
§Examples
use mcpls_core::config::ServerSelection;
assert_eq!(ServerSelection::default(), ServerSelection::Explicit);
assert_eq!(serde_json::to_string(&ServerSelection::Auto).unwrap(), "\"auto\"");Variants§
Explicit
Start exactly the configured command and args.
Auto
Start the native TypeScript server (tsc --lsp --stdio) instead of
the configured typescript-language-server when a TypeScript 7
install outside every workspace root is found. Valid only on
typescript-language-server entries.
Trait Implementations§
Source§impl Clone for ServerSelection
impl Clone for ServerSelection
impl Copy for ServerSelection
Source§impl Debug for ServerSelection
impl Debug for ServerSelection
Source§impl Default for ServerSelection
impl Default for ServerSelection
Source§impl<'de> Deserialize<'de> for ServerSelection
impl<'de> Deserialize<'de> for ServerSelection
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 ServerSelection
Source§impl PartialEq for ServerSelection
impl PartialEq for ServerSelection
Source§impl Serialize for ServerSelection
impl Serialize for ServerSelection
impl StructuralPartialEq for ServerSelection
Auto Trait Implementations§
impl Freeze for ServerSelection
impl RefUnwindSafe for ServerSelection
impl Send for ServerSelection
impl Sync for ServerSelection
impl Unpin for ServerSelection
impl UnsafeUnpin for ServerSelection
impl UnwindSafe for ServerSelection
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.