Struct watchman_client::Connector
source · [−]pub struct Connector { /* private fields */ }
Expand description
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.
Implementations
sourceimpl Connector
impl Connector
sourcepub fn new() -> Self
pub fn new() -> Self
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.
sourcepub fn watchman_cli_path<P: AsRef<Path>>(self, path: P) -> Self
pub fn watchman_cli_path<P: AsRef<Path>>(self, path: P) -> Self
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.
sourcepub fn unix_domain_socket<P: AsRef<Path>>(self, path: P) -> Self
pub fn unix_domain_socket<P: AsRef<Path>>(self, path: P) -> Self
Specify the unix domain socket path
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Connector
impl Send for Connector
impl Sync for Connector
impl Unpin for Connector
impl UnwindSafe for Connector
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more