pub struct Provider { /* private fields */ }Expand description
Caching the workspace root and lazily resolving binaries when the RPC service boots up.
Implementations§
Source§impl Provider
impl Provider
pub fn new(workspace_root: impl Into<PathBuf>) -> Self
Sourcepub fn resolve(&mut self) -> Result<TsserverBinary, ProviderError>
pub fn resolve(&mut self) -> Result<TsserverBinary, ProviderError>
Resolves the tsserver binary by inspecting (in order):
node_modules/typescript/lib/tsserver.jsin workspace ancestors..yarn/sdks/typescript/lib/tsserver.jsin ancestors.tsserveron PATH (viawhich).
pub fn workspace_root(&self) -> &Path
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Provider
impl RefUnwindSafe for Provider
impl Send for Provider
impl Sync for Provider
impl Unpin for Provider
impl UnwindSafe for Provider
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