Struct neovim::Session
[−]
[src]
pub struct Session { pub metadata: Metadata, // some fields omitted }
An active Neovim session.
Fields
metadata: Metadata
Methods
impl Session
[src]
fn new_tcp<A: ToSocketAddrs>(addr: A) -> Result<Session>
Connect to a Neovim instance over TCP.
fn new_stdio() -> Session
Connect to a Neovim instance using this process' standard input and output. Useful if Neovim started this process.
fn new_child(args: &[String]) -> Result<Session>
Connect to a Neovim instance by spawning a new one. Automatically passes --embed
as a command-line parameter.
Uses nvim
as the default command for launching Neovim, but this can be overridden
with the NVIM_BIN
environment variable.
fn new_socket()
Connect to a Neovim instance over a Unix socket. Currently unimplemented.
fn call(
&mut self,
method: String,
params: Vec<Value>
) -> Result<Receiver<RpcResult>, WriteError>
&mut self,
method: String,
params: Vec<Value>
) -> Result<Receiver<RpcResult>, WriteError>
Call a method over RPC.
fn call_sync(
&mut self,
method: String,
params: Vec<Value>
) -> Result<RpcResult, WriteError>
&mut self,
method: String,
params: Vec<Value>
) -> Result<RpcResult, WriteError>
Call a method over RPC, synchronously.
fn socket_addr(&self) -> Option<&SocketAddr>
Returns a reference to the TCP socket address used by this session.
If the connection isn't over TCP, this method returns None.