[][src]Struct libuv::handles::fs_poll::FsPollHandle

pub struct FsPollHandle { /* fields omitted */ }

FS Poll handles allow the user to monitor a given path for changes. Unlike FsEventHandle, fs poll handles use stat to detect when a file has changed so they can work on file systems where fs event handles can’t.

Implementations

impl FsPollHandle[src]

pub fn new(r#loop: &Loop) -> Result<FsPollHandle>[src]

Create and initialize a new fs poll handle

pub fn start<CB: Into<FsPollCB<'static>>>(
    &mut self,
    path: &str,
    interval: u32,
    cb: CB
) -> Result<(), Box<dyn Error>>
[src]

Check the file at path for changes every interval milliseconds.

Note: For maximum portability, use multi-second intervals. Sub-second intervals will not detect all changes on many file systems.

pub fn stop(&mut self) -> Result<()>[src]

Stop the handle, the callback will no longer be called.

pub fn getpath(&self) -> Result<String>[src]

Get the path being monitored by the handle.

Trait Implementations

impl Clone for FsPollHandle[src]

impl Copy for FsPollHandle[src]

impl From<FsPollHandle> for Handle[src]

impl HandleTrait for FsPollHandle[src]

impl ToHandle for FsPollHandle[src]

impl TryFrom<Handle> for FsPollHandle[src]

type Error = ConversionError

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.