[−][src]Struct listen::Listener
A Listener
Fields
files: Vec<String>
Vector of all files currently in directory listened to.
Implementations
impl Listener
[src]
pub fn new() -> Listener
[src]
pub fn listen<T, R>(&mut self, path: &str, arg: T, func: fn(_: T) -> R)
[src]
This function takes a path to listen on, the event to listen for, and a function to execute when that event happens.
path: &str
is the directory to listen on,
arg: T
is the argument to pass to func
,
and
func: fn(T) -> R
is the function to execute when event happens
pub fn store_files(&mut self, store_files: bool)
[src]
Configure listener to store files
Usage:
let mut listener = listen::Listener::new(); listener.store_files(true);
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Listener
impl Send for Listener
impl Sync for Listener
impl Unpin for Listener
impl UnwindSafe for Listener
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,