[][src]Struct watchman_client::Connector

pub struct Connector { /* fields omitted */ }

The Connector defines how to connect to the watchman server. You will typically use Connector::new to set up the connection with the environmental defaults. You might want to override those defaults in situations such as integration testing environments, or in extremely latency sensitive environments where the cost of performing discovery is a measurable overhead.

Methods

impl Connector[src]

pub fn new() -> Self[src]

Set up the connector with the system defaults. If WATCHMAN_SOCK is set in the environment it will preset the local IPC socket path. Otherwise the connector will invoke the watchman CLI to perform discovery.

pub fn watchman_cli_path<P: AsRef<Path>>(self, path: P) -> Self[src]

If the watchman CLI is installed in a location that is not present in the PATH environment variable, this method is used to inform the connector of its location.

pub fn unix_domain_socket<P: AsRef<Path>>(self, path: P) -> Self[src]

Specify the unix domain socket path

pub async fn connect(self) -> Result<Client, Error>[src]

Establish a connection to the watchman server. If the connector was configured to perform discovery (which is the default configuration), then this will attempt to start the watchman server.

Trait Implementations

impl Default for Connector[src]

Auto Trait Implementations

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.