pub struct MemoryWorkspaceWatcher { /* private fields */ }Expand description
Records watcher registrations and allows tests to push synthetic change events.
Implementations§
Source§impl MemoryWorkspaceWatcher
impl MemoryWorkspaceWatcher
pub fn new() -> Self
Sourcepub fn emit(&self, root: &WorkspaceRoot, change: WorkspaceChange) -> usize
pub fn emit(&self, root: &WorkspaceRoot, change: WorkspaceChange) -> usize
Push a synthetic change into the watcher — as if the filesystem changed.
Returns true if at least one subscriber received it.
Trait Implementations§
Source§impl Debug for MemoryWorkspaceWatcher
impl Debug for MemoryWorkspaceWatcher
Source§impl Default for MemoryWorkspaceWatcher
impl Default for MemoryWorkspaceWatcher
Source§fn default() -> MemoryWorkspaceWatcher
fn default() -> MemoryWorkspaceWatcher
Returns the “default value” for a type. Read more
Source§impl WorkspaceWatcher for MemoryWorkspaceWatcher
impl WorkspaceWatcher for MemoryWorkspaceWatcher
Source§fn watch<'life0, 'life1, 'async_trait>(
&'life0 self,
root: &'life1 WorkspaceRoot,
) -> Pin<Box<dyn Future<Output = Result<WatchHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn watch<'life0, 'life1, 'async_trait>(
&'life0 self,
root: &'life1 WorkspaceRoot,
) -> Pin<Box<dyn Future<Output = Result<WatchHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl !Freeze for MemoryWorkspaceWatcher
impl RefUnwindSafe for MemoryWorkspaceWatcher
impl Send for MemoryWorkspaceWatcher
impl Sync for MemoryWorkspaceWatcher
impl Unpin for MemoryWorkspaceWatcher
impl UnsafeUnpin for MemoryWorkspaceWatcher
impl UnwindSafe for MemoryWorkspaceWatcher
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