Struct watchman_client::ResolvedRoot
source · [−]pub struct ResolvedRoot { /* private fields */ }
Expand description
Data that describes a watched filesystem location. Watchman performs watch aggregation to project boundaries, so a request to watch a subdirectory will resolve to the higher level root path and a relative path offset. This struct encodes both pieces of information.
Implementations
sourceimpl ResolvedRoot
impl ResolvedRoot
sourcepub fn watcher(&self) -> &str
pub fn watcher(&self) -> &str
Returns the name of the watcher that the server is using to
monitor the path. The watcher is generally system dependent,
but some systems offer multipler watchers.
You generally don’t care too much about the watcher that is
in use, but if the watcher is a virtualized filesystem such as
eden
then you may wish to use to alternative queries to get the
best performance.
sourcepub fn project_root(&self) -> &Path
pub fn project_root(&self) -> &Path
Returns the root of the watchman project that is being watched
sourcepub fn path(&self) -> PathBuf
pub fn path(&self) -> PathBuf
Returns the absolute path to the directory that you requested be resolved.
sourcepub fn project_relative_path(&self) -> Option<&Path>
pub fn project_relative_path(&self) -> Option<&Path>
Returns the path to the directory that you requested be resolved,
relative to the project_root
.
Trait Implementations
sourceimpl Clone for ResolvedRoot
impl Clone for ResolvedRoot
sourcefn clone(&self) -> ResolvedRoot
fn clone(&self) -> ResolvedRoot
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for ResolvedRoot
impl Send for ResolvedRoot
impl Sync for ResolvedRoot
impl Unpin for ResolvedRoot
impl UnwindSafe for ResolvedRoot
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