amethyst_assets

Trait Reload

Source
pub trait Reload<D>:
    ReloadClone<D>
    + Send
    + Sync
    + 'static {
    // Required methods
    fn needs_reload(&self) -> bool;
    fn name(&self) -> String;
    fn format(&self) -> &'static str;
    fn reload(self: Box<Self>) -> Result<FormatValue<D>, Error>;
}
Expand description

The Reload trait provides a method which checks if an asset needs to be reloaded.

Required Methods§

Source

fn needs_reload(&self) -> bool

Checks if a reload is necessary.

Source

fn name(&self) -> String

Returns the asset name.

Source

fn format(&self) -> &'static str

Returns the format name.

Source

fn reload(self: Box<Self>) -> Result<FormatValue<D>, Error>

Reloads the asset.

Trait Implementations§

Source§

impl<D: 'static> Clone for Box<dyn Reload<D>>

Source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementors§

Source§

impl<D: 'static> Reload<D> for SingleFile<D>