pub enum AssetSourceEvent {
AddedAsset(PathBuf),
ModifiedAsset(PathBuf),
RemovedAsset(PathBuf),
RenamedAsset {
old: PathBuf,
new: PathBuf,
},
AddedMeta(PathBuf),
ModifiedMeta(PathBuf),
RemovedMeta(PathBuf),
RenamedMeta {
old: PathBuf,
new: PathBuf,
},
AddedFolder(PathBuf),
RemovedFolder(PathBuf),
RenamedFolder {
old: PathBuf,
new: PathBuf,
},
RemovedUnknown {
path: PathBuf,
is_meta: bool,
},
}
Expand description
An “asset source change event” that occurs whenever asset (or asset metadata) is created/added/removed
Variants§
AddedAsset(PathBuf)
An asset at this path was added.
ModifiedAsset(PathBuf)
An asset at this path was modified.
RemovedAsset(PathBuf)
An asset at this path was removed.
RenamedAsset
An asset at this path was renamed.
AddedMeta(PathBuf)
Asset metadata at this path was added.
ModifiedMeta(PathBuf)
Asset metadata at this path was modified.
RemovedMeta(PathBuf)
Asset metadata at this path was removed.
RenamedMeta
Asset metadata at this path was renamed.
AddedFolder(PathBuf)
A folder at the given path was added.
RemovedFolder(PathBuf)
A folder at the given path was removed.
RenamedFolder
A folder at the given path was renamed.
RemovedUnknown
Something of unknown type was removed. It is the job of the event handler to determine the type. This exists because notify-rs produces “untyped” rename events without destination paths for unwatched folders, so we can’t determine the type of the rename.
Trait Implementations§
Source§impl Clone for AssetSourceEvent
impl Clone for AssetSourceEvent
Source§fn clone(&self) -> AssetSourceEvent
fn clone(&self) -> AssetSourceEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AssetSourceEvent
impl Debug for AssetSourceEvent
Source§impl PartialEq for AssetSourceEvent
impl PartialEq for AssetSourceEvent
impl Eq for AssetSourceEvent
impl StructuralPartialEq for AssetSourceEvent
Auto Trait Implementations§
impl Freeze for AssetSourceEvent
impl RefUnwindSafe for AssetSourceEvent
impl Send for AssetSourceEvent
impl Sync for AssetSourceEvent
impl Unpin for AssetSourceEvent
impl UnwindSafe for AssetSourceEvent
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
)Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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
.Source§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
.Source§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.Source§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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.