Struct quadoculars::Watch[][src]

pub struct Watch { /* fields omitted */ }

Implementations

impl Watch[src]

pub fn new() -> Watch[src]

pub fn set_timeout(self, duration: f32) -> Watch[src]

Set timeout. so if the file renamed/removed permanently, the watcher will be able to terminate itself.

default value is 0.63 seconds, set large than that if intended for watching huge file.

pub fn single_file<'a>(
    &self,
    file: &'a PathBuf,
    tx: Sender<Fstate<PathBuf>>
) -> Result<bool>
[src]

Single file watcher

pub fn multiple_files(
    &self,
    vec_files: &mut Vec<PathBuf>,
    tx: Sender<Fstate<PathBuf>>
) -> Result<bool>
[src]

Technically the same as single_file watcher, but for multilple files.

pub fn is_continue<'a>(vec_files: &mut Vec<PathBuf>, file: &'a PathBuf) -> bool[src]

Additional for multiple_files to check if there’s watcher(s) still continue watching the file(s).

Trait Implementations

impl Clone for Watch[src]

Auto Trait Implementations

impl RefUnwindSafe for Watch

impl Send for Watch

impl Sync for Watch

impl Unpin for Watch

impl UnwindSafe for Watch

Blanket Implementations

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

impl<T> Any for T where
    T: Any

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

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

impl<T> CloneAny for T where
    T: Any + Clone

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.