Struct SysFSEventStream

Source
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

Source

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.

Source

pub fn show(&mut self)

Source

pub fn schedule(&mut self, run_loop: &CFRunLoop, run_loop_mode: CFStringRef)

Source

pub fn unschedule(&mut self, run_loop: &CFRunLoop, run_loop_mode: CFStringRef)

Source

pub fn start(&mut self) -> bool

Source

pub fn flush_sync(&mut self)

Source

pub fn stop(&mut self)

Source

pub fn invalidate(&mut self)

Trait Implementations§

Source§

impl Drop for SysFSEventStream

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Send for SysFSEventStream

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.