pub struct Dummy<Q>{ /* 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>
impl<Q> Handler for Dummy<Q>
Source§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> Freeze for Dummy<Q>
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