pub struct FsChangesArgs {
pub timestamp: DInstant,
pub changes: Arc<Vec<FsChange>>,
pub propagation: EventPropagationHandle,
}Expand description
FS_CHANGES_EVENT arguments.
Fields§
§timestamp: DInstantInstant the event happened.
changes: Arc<Vec<FsChange>>All notify changes since the last event.
propagation: EventPropagationHandlePropagation handle associated with this event instance.
Cloned arguments share the same handle, some arguments may also share the handle of another event if they share the same cause.
Implementations§
Source§impl FsChangesArgs
impl FsChangesArgs
Source§impl FsChangesArgs
impl FsChangesArgs
Sourcepub fn errors(&self) -> impl Iterator<Item = &Error> + '_
pub fn errors(&self) -> impl Iterator<Item = &Error> + '_
Iterate over all file watcher errors.
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 is_in_target(&self, _id: WidgetId) -> bool
fn is_in_target(&self, _id: WidgetId) -> bool
None, only app level handlers receive this event.
Source§fn propagation(&self) -> &EventPropagationHandle
fn propagation(&self) -> &EventPropagationHandle
Source§fn clone_boxed(&self) -> Box<dyn AnyEventArgs>
fn clone_boxed(&self) -> Box<dyn AnyEventArgs>
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
Source§impl PartialEq for FsChangesArgs
impl PartialEq for FsChangesArgs
impl EventArgs for FsChangesArgs
impl StructuralPartialEq 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> AnyVarValue for T
impl<T> AnyVarValue for T
Source§fn clone_boxed(&self) -> BoxAnyVarValue
fn clone_boxed(&self) -> BoxAnyVarValue
Source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
self and other are equal.Source§fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
other if both are of the same type.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§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> 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