[−][src]Struct nvim_rs::rpc::handler::DefaultHandler
The default 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.
Methods
impl<Q> DefaultHandler<Q> where
Q: AsyncWrite + Send + Sync + Unpin + 'static,
[src]
Q: AsyncWrite + Send + Sync + Unpin + 'static,
pub fn new() -> DefaultHandler<Q>
[src]
Trait Implementations
impl<Q> Handler for DefaultHandler<Q> where
Q: AsyncWrite + Send + Sync + Unpin + 'static,
[src]
Q: AsyncWrite + Send + Sync + Unpin + 'static,
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. Read more
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
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
_name: String,
_args: Vec<Value>,
_neovim: Neovim<Self::Writer>
) -> Pin<Box<dyn Future<Output = Result<Value, Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn handle_notify<'life0, 'async_trait>(
&'life0 self,
_name: String,
_args: Vec<Value>,
_neovim: Neovim<Self::Writer>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
_name: String,
_args: Vec<Value>,
_neovim: Neovim<Self::Writer>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations
impl<Q> RefUnwindSafe for DefaultHandler<Q> where
Q: RefUnwindSafe,
Q: RefUnwindSafe,
impl<Q> Send for DefaultHandler<Q>
impl<Q> Sync for DefaultHandler<Q>
impl<Q> Unpin for DefaultHandler<Q>
impl<Q> UnwindSafe for DefaultHandler<Q> where
Q: RefUnwindSafe,
Q: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,