pub struct WatcherHandle { /* private fields */ }Expand description
Handle to manage a running CodeGraph watcher. Provides lifecycle management: start, stop, status check. Internally uses Arc, so it can be cloned and shared across threads.
Implementations§
Source§impl WatcherHandle
impl WatcherHandle
Sourcepub fn with_auto_detect(start_path: &Path) -> Self
pub fn with_auto_detect(start_path: &Path) -> Self
Create handle with automatic project root detection.
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Check if watcher is currently running.
Sourcepub fn start_if_needed(&self, cancel_token: CancellationToken) -> bool
pub fn start_if_needed(&self, cancel_token: CancellationToken) -> bool
Start watcher if not running and no daemon conflict. Returns true if watcher was started.
Sourcepub fn inner(&self) -> Arc<Mutex<Option<JoinHandle<()>>>>
pub fn inner(&self) -> Arc<Mutex<Option<JoinHandle<()>>>>
Get the underlying handle for passing to async contexts.
Sourcepub fn project_path(&self) -> &Path
pub fn project_path(&self) -> &Path
Get the project path.
Trait Implementations§
Source§impl Clone for WatcherHandle
impl Clone for WatcherHandle
Source§fn clone(&self) -> WatcherHandle
fn clone(&self) -> WatcherHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WatcherHandle
impl RefUnwindSafe for WatcherHandle
impl Send for WatcherHandle
impl Sync for WatcherHandle
impl Unpin for WatcherHandle
impl UnsafeUnpin for WatcherHandle
impl UnwindSafe for WatcherHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more