pub struct Server<Checker: BuildRunnable = PackageBuilder, Parser: Parsable = SimpleParser> {
pub flags: Flags,
/* private fields */
}Expand description
A Language Server, which can be used any object implementing BuildRunnable internally by passing it as a generic parameter.
Fields§
§flags: FlagsImplementations§
Source§impl<Checker: BuildRunnable, Parser: Parsable> Server<Checker, Parser>
impl<Checker: BuildRunnable, Parser: Parsable> Server<Checker, Parser>
Sourcepub fn start_client_health_checker(&self, receiver: Receiver<WorkerMessage<()>>)
pub fn start_client_health_checker(&self, receiver: Receiver<WorkerMessage<()>>)
Send an empty workspace/configuration request periodically.
If there is no response to the request within a certain period of time, terminate the server.
Source§impl<Checker: BuildRunnable, Parser: Parsable> Server<Checker, Parser>
impl<Checker: BuildRunnable, Parser: Parsable> Server<Checker, Parser>
Sourcepub fn dependencies_of(&self, uri: &NormalizedUrl) -> Vec<NormalizedUrl>
pub fn dependencies_of(&self, uri: &NormalizedUrl) -> Vec<NormalizedUrl>
self is included. if self is not in the graph, return empty vec
Sourcepub fn dependents_of(&self, uri: &NormalizedUrl) -> Vec<NormalizedUrl>
pub fn dependents_of(&self, uri: &NormalizedUrl) -> Vec<NormalizedUrl>
self is not included
Source§impl Server
impl Server
pub fn bind_fake_client() -> FakeClient<Server>
Source§impl<Checker: BuildRunnable, Parser: Parsable> Server<Checker, Parser>
impl<Checker: BuildRunnable, Parser: Parsable> Server<Checker, Parser>
pub fn new(cfg: ErgConfig, stdout_redirect: Option<Sender<Value>>) -> Self
pub fn run(self)
pub const fn mode(&self) -> &str
pub fn dispatch(&mut self, msg: Value) -> ELSResult<()>
pub fn get_file_cache(&self) -> &FileCache
pub fn remove_module_entry( &mut self, uri: &NormalizedUrl, ) -> Option<ModuleEntry>
pub fn insert_module_entry(&mut self, uri: NormalizedUrl, entry: ModuleEntry)
pub fn get_hir( &self, uri: &NormalizedUrl, ) -> Option<MappedRwLockReadGuard<'_, HIR>>
pub fn steal_entry(&self, uri: &NormalizedUrl) -> Option<ModuleEntry>
pub fn restore_entry(&self, uri: NormalizedUrl, entry: ModuleEntry)
pub fn get_ast( &self, uri: &NormalizedUrl, ) -> Option<MappedRwLockReadGuard<'_, Module>>
pub fn get_warns(&self, uri: &NormalizedUrl) -> Option<Vec<&CompileWarning>>
Trait Implementations§
Source§impl<Checker: Debug + BuildRunnable, Parser: Debug + Parsable> Debug for Server<Checker, Parser>
impl<Checker: Debug + BuildRunnable, Parser: Debug + Parsable> Debug for Server<Checker, Parser>
Source§impl LangServer for Server
impl LangServer for Server
Source§impl<C: BuildRunnable, P: Parsable> RedirectableStdout for Server<C, P>
impl<C: BuildRunnable, P: Parsable> RedirectableStdout for Server<C, P>
fn sender(&self) -> Option<&Sender<Value>>
fn send_stdout<T>(&self, message: &T) -> Result<(), Box<dyn Error>>
fn send_log<S>(&self, msg: S) -> Result<(), Box<dyn Error>>
fn send_info<S>(&self, msg: S) -> Result<(), Box<dyn Error>>
fn send_error_info<S>(&self, msg: S) -> Result<(), Box<dyn Error>>
fn send_error<S>( &self, id: Option<i64>, code: i64, msg: S, ) -> Result<(), Box<dyn Error>>
fn send_invalid_req_error(&self) -> Result<(), Box<dyn Error>>
Auto Trait Implementations§
impl<Checker, Parser> Freeze for Server<Checker, Parser>
impl<Checker = GenericPackageBuilder, Parser = SimpleParser> !RefUnwindSafe for Server<Checker, Parser>
impl<Checker, Parser> Send for Server<Checker, Parser>
impl<Checker, Parser> Sync for Server<Checker, Parser>
impl<Checker, Parser> Unpin for Server<Checker, Parser>
impl<Checker = GenericPackageBuilder, Parser = SimpleParser> !UnwindSafe for Server<Checker, Parser>
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