Struct amethyst_assets::Processor
source · pub struct Processor<A> { /* private fields */ }
Expand description
A default implementation for an asset processing system
which converts data to assets and maintains the asset storage
for A
.
This system can only be used if the asset data implements
Into<Result<A, BoxedErr>>
.
Implementations
Trait Implementations
sourceimpl<'a, A> System<'a> for Processor<A>where
A: Asset,
A::Data: Into<Result<ProcessingState<A>>>,
impl<'a, A> System<'a> for Processor<A>where
A: Asset,
A::Data: Into<Result<ProcessingState<A>>>,
type SystemData = (Write<'a, AssetStorage<A>, DefaultProvider>, Read<'a, Arc<ThreadPool>, PanicHandler>, Read<'a, Time, DefaultProvider>, Option<Read<'a, HotReloadStrategy, DefaultProvider>>)
type SystemData = (Write<'a, AssetStorage<A>, DefaultProvider>, Read<'a, Arc<ThreadPool>, PanicHandler>, Read<'a, Time, DefaultProvider>, Option<Read<'a, HotReloadStrategy, DefaultProvider>>)
The resource bundle required to execute this system. Read more
sourcefn run(&mut self, (storage, pool, time, strategy): Self::SystemData)
fn run(&mut self, (storage, pool, time, strategy): Self::SystemData)
Executes the system with the required system
data. Read more
sourcefn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTime
Returns a hint how long the system needs for running.
This is used to optimize the way they’re executed (might
allow more parallelization). Read more
sourcefn accessor<'b>(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor<'b>(&'b self) -> AccessorCow<'a, 'b, Self>
Return the accessor from the
SystemData
.Auto Trait Implementations
impl<A> RefUnwindSafe for Processor<A>where
A: RefUnwindSafe,
impl<A> Send for Processor<A>where
A: Send,
impl<A> Sync for Processor<A>where
A: Sync,
impl<A> Unpin for Processor<A>where
A: Unpin,
impl<A> UnwindSafe for Processor<A>where
A: UnwindSafe,
Blanket Implementations
impl<T> Any for Twhere
T: Any,
impl<T> Any for Twhere
T: Any,
fn get_type_id(&self) -> TypeId
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<'a, T> RunWithPool<'a> for Twhere
T: System<'a>,
impl<'a, T> RunWithPool<'a> for Twhere
T: System<'a>,
sourcefn run(&mut self, res: &'a Resources, _: &ThreadPool)
fn run(&mut self, res: &'a Resources, _: &ThreadPool)
Runs the system/group of systems. Possibly in parallel depending
on how the structure is set up. Read more
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read morefn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.