pub struct ServerDef {
pub kind: ServerKind,
pub name: &'static str,
pub extensions: &'static [&'static str],
pub binary: &'static str,
pub args: &'static [&'static str],
pub root_markers: &'static [&'static str],
}Expand description
Definition of a language server.
Fields§
§kind: ServerKind§name: &'static strDisplay name.
extensions: &'static [&'static str]File extensions this server handles.
binary: &'static strBinary name to look up on PATH.
args: &'static [&'static str]Arguments to pass when spawning.
root_markers: &'static [&'static str]Root marker files — presence indicates a workspace root.
Implementations§
Source§impl ServerDef
impl ServerDef
Sourcepub fn matches_extension(&self, ext: &str) -> bool
pub fn matches_extension(&self, ext: &str) -> bool
Check if this server handles a given file extension.
Sourcepub fn is_available(&self) -> bool
pub fn is_available(&self) -> bool
Check if the server binary is available on PATH.
Trait Implementations§
impl Eq for ServerDef
impl StructuralPartialEq for ServerDef
Auto Trait Implementations§
impl Freeze for ServerDef
impl RefUnwindSafe for ServerDef
impl Send for ServerDef
impl Sync for ServerDef
impl Unpin for ServerDef
impl UnsafeUnpin for ServerDef
impl UnwindSafe for ServerDef
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more