pub struct TinymistLanguageServer { /* private fields */ }Expand description
The Tinymist Language Server for WebAssembly.
Implementations§
Source§impl TinymistLanguageServer
impl TinymistLanguageServer
Sourcepub fn new(
send_diagnostics: Function,
send_request: Function,
send_notification: Function,
) -> Self
pub fn new( send_diagnostics: Function, send_request: Function, send_notification: Function, ) -> Self
Creates a new instance of the Tinymist Language Server.
Sourcepub fn on_request(
&self,
method: String,
js_params: JsValue,
) -> Result<JsValue, JsValue>
pub fn on_request( &self, method: String, js_params: JsValue, ) -> Result<JsValue, JsValue>
Handles incoming requests.
Sourcepub fn on_notification(&self, method: String, js_params: JsValue) -> Promise
pub fn on_notification(&self, method: String, js_params: JsValue) -> Promise
Handles incoming notifications.
Trait Implementations§
Source§impl From<TinymistLanguageServer> for JsValue
impl From<TinymistLanguageServer> for JsValue
Source§fn from(value: TinymistLanguageServer) -> Self
fn from(value: TinymistLanguageServer) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for TinymistLanguageServer
impl FromWasmAbi for TinymistLanguageServer
Source§impl IntoWasmAbi for TinymistLanguageServer
impl IntoWasmAbi for TinymistLanguageServer
Source§impl RefFromWasmAbi for TinymistLanguageServer
impl RefFromWasmAbi for TinymistLanguageServer
Source§type Anchor = RcRef<TinymistLanguageServer>
type Anchor = RcRef<TinymistLanguageServer>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl VectorFromWasmAbi for TinymistLanguageServer
impl VectorFromWasmAbi for TinymistLanguageServer
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[TinymistLanguageServer]>
Source§impl VectorIntoWasmAbi for TinymistLanguageServer
impl VectorIntoWasmAbi for TinymistLanguageServer
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[TinymistLanguageServer]>) -> Self::Abi
Source§impl WasmDescribeVector for TinymistLanguageServer
impl WasmDescribeVector for TinymistLanguageServer
impl SupportsConstructor for TinymistLanguageServer
impl SupportsInstanceProperty for TinymistLanguageServer
impl SupportsStaticProperty for TinymistLanguageServer
Auto Trait Implementations§
impl Freeze for TinymistLanguageServer
impl RefUnwindSafe for TinymistLanguageServer
impl !Send for TinymistLanguageServer
impl !Sync for TinymistLanguageServer
impl Unpin for TinymistLanguageServer
impl UnwindSafe for TinymistLanguageServer
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> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.