pub struct SysFSEventStream(/* private fields */);Expand description
An ergonomic wrapper of SysFSEventStreamRef.
This wrapper complies with Rust’s ownership model, and releases its resource when dropped.
Implementations§
Source§impl SysFSEventStream
impl SysFSEventStream
Sourcepub fn new<P: AsRef<Path>>(
callback: FSEventStreamCallback,
context: &SysFSEventStreamContext,
paths_to_watch: impl IntoIterator<Item = P>,
since_when: FSEventStreamEventId,
latency: Duration,
flags: FSEventStreamCreateFlags,
) -> Result<Self>
pub fn new<P: AsRef<Path>>( callback: FSEventStreamCallback, context: &SysFSEventStreamContext, paths_to_watch: impl IntoIterator<Item = P>, since_when: FSEventStreamEventId, latency: Duration, flags: FSEventStreamCreateFlags, ) -> Result<Self>
Create a new SysFSEventStream.
§Errors
Return error when there’s any invalid path in paths_to_watch.
pub fn show(&mut self)
pub fn schedule(&mut self, run_loop: &CFRunLoop, run_loop_mode: CFStringRef)
pub fn unschedule(&mut self, run_loop: &CFRunLoop, run_loop_mode: CFStringRef)
pub fn start(&mut self) -> bool
pub fn flush_sync(&mut self)
pub fn stop(&mut self)
pub fn invalidate(&mut self)
Trait Implementations§
Source§impl Drop for SysFSEventStream
impl Drop for SysFSEventStream
impl Send for SysFSEventStream
Auto Trait Implementations§
impl Freeze for SysFSEventStream
impl RefUnwindSafe for SysFSEventStream
impl !Sync for SysFSEventStream
impl Unpin for SysFSEventStream
impl UnwindSafe for SysFSEventStream
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