pub struct Dummy<Q>where
Q: AsyncWrite + Send + Sync + Unpin + 'static,{ /* private fields */ }
Expand description
The dummy handler defaults to doing nothing with a notification, and returning a generic error for a request. It can be used if a plugin only wants to send requests to neovim and get responses, but not handle any notifications or requests.
Implementations§
Trait Implementations§
source§impl<Q> Handler for Dummy<Q>where
Q: AsyncWrite + Send + Sync + Unpin + 'static,
impl<Q> Handler for Dummy<Q>where Q: AsyncWrite + Send + Sync + Unpin + 'static,
§type Writer = Q
type Writer = Q
The type where we write our responses to requests. Handling of incoming
requests/notifications is done on the io loop, which passes the parsed
messages to the handler.
source§fn handle_request<'life0, 'async_trait>(
&'life0 self,
_name: String,
_args: Vec<Value>,
_neovim: Neovim<Self::Writer>
) -> Pin<Box<dyn Future<Output = Result<Value, Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_request<'life0, 'async_trait>( &'life0 self, _name: String, _args: Vec<Value>, _neovim: Neovim<Self::Writer> ) -> Pin<Box<dyn Future<Output = Result<Value, Value>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Handling an rpc request. The ID’s of requests are handled by the
neovim
instance.source§fn handle_notify<'life0, 'async_trait>(
&'life0 self,
_name: String,
_args: Vec<Value>,
_neovim: Neovim<<Self as Handler>::Writer>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_notify<'life0, 'async_trait>( &'life0 self, _name: String, _args: Vec<Value>, _neovim: Neovim<<Self as Handler>::Writer> ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Handling an rpc notification. Notifications are handled one at a time in
the order in which they were received, and will block new requests from
being received until handle_notify returns.
Auto Trait Implementations§
impl<Q> RefUnwindSafe for Dummy<Q>where Q: RefUnwindSafe,
impl<Q> Send for Dummy<Q>
impl<Q> Sync for Dummy<Q>
impl<Q> Unpin for Dummy<Q>
impl<Q> UnwindSafe for Dummy<Q>where Q: RefUnwindSafe,
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