pub struct Service { /* private fields */ }Expand description
Public facade invoked by Neovim (or any embedding host). Eventually this type will implement whatever trait the chosen RPC runtime expects.
Implementations§
Source§impl Service
impl Service
pub fn new(config: Config, provider: Provider) -> Self
Sourcepub fn start(&mut self) -> Result<(), ServiceError>
pub fn start(&mut self) -> Result<(), ServiceError>
Bootstraps tsserver processes once
Sourcepub fn dispatch_request(
&mut self,
route: Route,
payload: Value,
priority: Priority,
) -> Result<Vec<DispatchReceipt>, ServiceError>
pub fn dispatch_request( &mut self, route: Route, payload: Value, priority: Priority, ) -> Result<Vec<DispatchReceipt>, ServiceError>
Queues a request for the given route and returns the syntax seq (when applicable).
Sourcepub fn cancel(&self, seq: u64) -> Result<(), ServiceError>
pub fn cancel(&self, seq: u64) -> Result<(), ServiceError>
Cancels a pending request on both servers.
Sourcepub fn poll_responses(&self) -> Vec<ServerEvent>
pub fn poll_responses(&self) -> Vec<ServerEvent>
Drains any ready responses from syntax/semantic readers without blocking.
pub fn workspace_root(&self) -> &Path
pub fn update_config(&mut self, new_config: Config)
pub fn restart( &mut self, restart_syntax: bool, restart_semantic: bool, ) -> Result<(), ServiceError>
pub fn config(&self) -> &Config
pub fn config_mut(&mut self) -> &mut Config
pub fn tsserver_status(&self) -> TsserverStatus
Auto Trait Implementations§
impl Freeze for Service
impl !RefUnwindSafe for Service
impl Send for Service
impl Sync for Service
impl Unpin for Service
impl !UnwindSafe for Service
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