pub struct DirWatch(/* private fields */);Expand description
A live directory watch inside one Computer.
Dropping it cancels the watch — for the vm-proto client that is the connection close the agent tears its inotify watch down on.
Implementations§
Source§impl DirWatch
impl DirWatch
Sourcepub fn new(events: Box<dyn FsEvents>) -> Self
pub fn new(events: Box<dyn FsEvents>) -> Self
Wrap an implementation’s event stream. This is what makes
GuestFiles::watch implementable off this crate’s transport.
Sourcepub async fn next_event(&mut self) -> Result<Option<FsEventDto>>
pub async fn next_event(&mut self) -> Result<Option<FsEventDto>>
Next filesystem event. Ok(None) is the clean end of the stream —
the guest side closed it because the Computer stopped.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DirWatch
impl !Sync for DirWatch
impl !UnwindSafe for DirWatch
impl Freeze for DirWatch
impl Send for DirWatch
impl Unpin for DirWatch
impl UnsafeUnpin for DirWatch
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