[][src]Struct tokio_hglib::Client

pub struct Client<C> { /* fields omitted */ }

Command-server client holding active connection.

Implementations

impl<C> Client<C> where
    C: Connection
[src]

pub async fn run_command_os(
    &mut self,
    handler: &mut impl UiHandler,
    args: impl IntoIterator<Item = impl AsRef<OsStr>>
) -> Result<i32>
[src]

Runs the Mercurial command specified in platform string.

impl Client<UnixConnection>[src]

pub async fn connect(path: impl AsRef<Path>) -> Result<Self>[src]

Connects to a command server listening at the specified socket path.

impl<C> Client<C>[src]

pub fn server_spec(&self) -> &ServerSpec[src]

Server capabilities, encoding, etc.

pub fn borrow_protocol_mut(&mut self) -> &mut Protocol<C>[src]

Mutably borrows the underlying protocol.

This is a low-level interface to implement new command handler.

impl<C> Client<C> where
    C: Connection
[src]

pub async fn run_command(
    &mut self,
    handler: &mut impl UiHandler,
    args: impl IntoIterator<Item = impl AsRef<[u8]>>
) -> Result<i32>
[src]

Runs the Mercurial command specified in bytes.

Panics

Panics if argument contains \0 character.

impl Client<PipeConnection>[src]

pub async fn spawn_at(dir: impl AsRef<Path>) -> Result<Self>[src]

Spawns a server process at the specified directory with the default configuration.

pub async fn spawn_with(command: &mut Command) -> Result<Self>[src]

Spawns a server process by the given process builder.

Trait Implementations

impl<C> AsRawFd for Client<C> where
    C: AsRawFd
[src]

impl<C: Debug> Debug for Client<C>[src]

Auto Trait Implementations

impl<C> RefUnwindSafe for Client<C> where
    C: RefUnwindSafe
[src]

impl<C> Send for Client<C> where
    C: Send
[src]

impl<C> Sync for Client<C> where
    C: Sync
[src]

impl<C> Unpin for Client<C> where
    C: Unpin
[src]

impl<C> UnwindSafe for Client<C> where
    C: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.