pub struct FsChangesArgs {
pub timestamp: DInstant,
pub changes: Arc<Vec<FsChange>>,
/* private fields */
}
Expand description
FS_CHANGES_EVENT
arguments.
Fields§
§timestamp: DInstant
Instant the event happened.
changes: Arc<Vec<FsChange>>
All notify changes since the last event.
Implementations§
source§impl FsChangesArgs
impl FsChangesArgs
source§impl FsChangesArgs
impl FsChangesArgs
sourcepub fn rescan(&self) -> bool
pub fn rescan(&self) -> bool
Returns true
is some events where lost.
This indicates either a lapse in the events or a change in the filesystem such that events received so far can no longer be relied on to represent the state of the filesystem now.
An application that simply reacts to file changes may not care about this. An application that keeps an in-memory representation of the filesystem will need to care, and will need to refresh that representation directly from the filesystem.
sourcepub fn changes_for(
&self,
glob: &str,
) -> Result<impl Iterator<Item = &FsChange>, PatternError>
pub fn changes_for( &self, glob: &str, ) -> Result<impl Iterator<Item = &FsChange>, PatternError>
Iterate over all changes that affects paths selected by the glob
pattern.
sourcepub fn changes_for_path<'a>(
&'a self,
path: &'a Path,
) -> impl Iterator<Item = &'a FsChange> + 'a
pub fn changes_for_path<'a>( &'a self, path: &'a Path, ) -> impl Iterator<Item = &'a FsChange> + 'a
Iterate over all changes that affects paths that are equal to path
or inside it.
sourcepub fn events_for(
&self,
glob: &str,
) -> Result<impl Iterator<Item = &Event>, PatternError>
pub fn events_for( &self, glob: &str, ) -> Result<impl Iterator<Item = &Event>, PatternError>
Iterate over all change events that affects that are equal to path
or inside it.
sourcepub fn events_for_path<'a>(
&'a self,
path: &'a Path,
) -> impl Iterator<Item = &'a Event> + 'a
pub fn events_for_path<'a>( &'a self, path: &'a Path, ) -> impl Iterator<Item = &'a Event> + 'a
Iterate over all change events that affects paths that are equal to path
or inside it.
Trait Implementations§
source§impl AnyEventArgs for FsChangesArgs
impl AnyEventArgs for FsChangesArgs
source§fn delivery_list(&self, list: &mut UpdateDeliveryList)
fn delivery_list(&self, list: &mut UpdateDeliveryList)
None, only app level handlers receive this event.
source§fn clone_any(&self) -> Box<dyn AnyEventArgs>
fn clone_any(&self) -> Box<dyn AnyEventArgs>
source§fn propagation(&self) -> &EventPropagationHandle
fn propagation(&self) -> &EventPropagationHandle
source§impl Clone for FsChangesArgs
impl Clone for FsChangesArgs
source§fn clone(&self) -> FsChangesArgs
fn clone(&self) -> FsChangesArgs
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FsChangesArgs
impl Debug for FsChangesArgs
Auto Trait Implementations§
impl Freeze for FsChangesArgs
impl !RefUnwindSafe for FsChangesArgs
impl Send for FsChangesArgs
impl Sync for FsChangesArgs
impl Unpin for FsChangesArgs
impl !UnwindSafe for FsChangesArgs
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> FsChangeNote for T
impl<T> FsChangeNote for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more