Struct hglib::connection::Connection
[−]
[src]
pub struct Connection { /* fields omitted */ }
A handle to a running command server instance.
Methods
impl Connection
[src]
fn new() -> Result<Connection>
Spawns a new command server process.
fn read_hello(&mut self) -> Result<(Vec<String>, String)>
Reads and parses the server hello message. Returns a tuple of ([capabilities], encoding).
Errors
Returns an I/O error if reading or parsing the hello message failed.
fn raw_command(&mut self, command: Vec<&[u8]>) -> Result<CommandRun>
Sends the given command
to Mercurial, returning an iterator
over the results.
fn close(&mut self) -> Result<ExitStatus>
Shuts down the command server process.