pub enum AssetChangeEvent {
Modified {
path: PathBuf,
},
Created {
path: PathBuf,
},
Deleted {
path: PathBuf,
},
Renamed {
from: PathBuf,
to: PathBuf,
},
}Expand description
Event representing a change to an asset file.
Emitted by the hot reload system when a file is modified, created, or deleted.
Variants§
Modified
Asset file was modified.
Created
Asset file was created.
Deleted
Asset file was deleted.
Renamed
Asset file was renamed.
Implementations§
Source§impl AssetChangeEvent
impl AssetChangeEvent
Sourcepub fn is_modified(&self) -> bool
pub fn is_modified(&self) -> bool
Returns true if this is a modification event.
Sourcepub fn is_created(&self) -> bool
pub fn is_created(&self) -> bool
Returns true if this is a creation event.
Sourcepub fn is_deleted(&self) -> bool
pub fn is_deleted(&self) -> bool
Returns true if this is a deletion event.
Sourcepub fn is_renamed(&self) -> bool
pub fn is_renamed(&self) -> bool
Returns true if this is a rename event.
Trait Implementations§
Source§impl Clone for AssetChangeEvent
impl Clone for AssetChangeEvent
Source§fn clone(&self) -> AssetChangeEvent
fn clone(&self) -> AssetChangeEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AssetChangeEvent
impl Debug for AssetChangeEvent
Source§impl Display for AssetChangeEvent
impl Display for AssetChangeEvent
Source§impl PartialEq for AssetChangeEvent
impl PartialEq for AssetChangeEvent
impl Eq for AssetChangeEvent
impl StructuralPartialEq for AssetChangeEvent
Auto Trait Implementations§
impl Freeze for AssetChangeEvent
impl RefUnwindSafe for AssetChangeEvent
impl Send for AssetChangeEvent
impl Sync for AssetChangeEvent
impl Unpin for AssetChangeEvent
impl UnsafeUnpin for AssetChangeEvent
impl UnwindSafe for AssetChangeEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key and return true if they are equal.Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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>
Converts
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>
Converts
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