[][src]Trait specs::prelude::System

pub trait System<'a> {
    type SystemData: DynamicSystemData<'a>;
    fn run(&mut self, data: Self::SystemData);

    fn running_time(&self) -> RunningTime { ... }
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self> { ... }
fn setup(&mut self, world: &mut World) { ... }
fn dispose(self, world: &mut World) { ... } }
[]

A System, executed with a set of required Resources.

Associated Types

type SystemData: DynamicSystemData<'a>[]

The resource bundle required to execute this system.

You will mostly use a tuple of system data (which also implements SystemData). You can also create such a resource bundle by simply deriving SystemData for a struct.

Every SystemData is also a DynamicSystemData.

Required methods

fn run(&mut self, data: Self::SystemData)[]

Executes the system with the required system data.

Provided methods

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).

Defaults to RunningTime::Average.

fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>[]

Return the accessor from the [SystemData].

fn setup(&mut self, world: &mut World)[]

Sets up the World using Self::SystemData::setup.

fn dispose(self, world: &mut World)[]

Performs clean up that requires resources from the World. This commonly removes components from world which depend on external resources.

Implementors

impl<'a, '_, '_> System<'a> for DefaultBatchControllerSystem<'_, '_>[src][]

type SystemData = BatchUncheckedWorld<'a>

impl<'a> System<'a> for VertexSkinningSystem

impl<'a, I, T> System<'a> for AnimationControlSystem<I, T> where
    I: PartialEq + Eq + Hash + Copy + Send + Sync + 'static,
    T: AnimationSampling + Component + Clone

impl<'a, T> System<'a> for SamplerInterpolationSystem<T> where
    T: AnimationSampling + Component

impl<'a, T> System<'a> for PrefabLoaderSystem<T> where
    T: PrefabData<'a> + Send + Sync + 'static, 

impl<'a> System<'a> for HotReloadSystem

impl<'a, A> System<'a> for Processor<A> where
    A: Asset + ProcessableAsset

impl<'a> System<'a> for AudioSystem

impl<'a, F, R> System<'a> for DjSystem<F, R> where
    F: FnMut(&mut R) -> Option<SourceHandle>,
    R: Resource

impl<'a, T: BindingTypes> System<'a> for FlyMovementSystem<T>

impl<'a> System<'a> for ArcBallRotationSystem

impl<'a> System<'a> for FreeRotationSystem

impl<'a> System<'a> for MouseFocusUpdateSystem

impl<'a> System<'a> for CursorHideSystem

impl<'a> System<'a> for TransformSystem

impl<'a> System<'a> for HideHierarchySystem

impl<'s, S, V: 'static> System<'s> for Pausable<S, V> where
    S::SystemData: SystemData<'s>,
    S: System<'s>,
    V: Send + Sync + Default + PartialEq

impl<'a, T: BindingTypes> System<'a> for InputSystem<T>

impl<'a, E> System<'a> for NetSocketSystem<E> where
    E: Send + Sync + Serialize + Clone + DeserializeOwned + PartialEq + 'static, 

impl<'a> System<'a> for SpriteVisibilitySortingSystem

impl<'a, B: Backend> System<'a> for MeshProcessorSystem<B>

impl<'a, B: Backend> System<'a> for TextureProcessorSystem<B>

impl<'a> System<'a> for VisibilitySortingSystem

impl<'a> System<'a> for BlinkSystem

impl<'s> System<'s> for UiButtonSystem

impl<'a, T: BindingTypes> System<'a> for UiMouseSystem<T>

impl<'s, T> System<'s> for EventRetriggerSystem<T> where
    T: EventRetrigger, 

impl<'a, B: Backend> System<'a> for UiGlyphsSystem<B>

impl<'a> System<'a> for UiTransformSystem

impl<'a> System<'a> for ResizeSystem

impl<'a, G> System<'a> for SelectionKeyboardSystem<G> where
    G: Send + Sync + 'static + PartialEq

impl<'a, G, T: BindingTypes> System<'a> for SelectionMouseSystem<G, T> where
    G: Send + Sync + 'static + PartialEq

impl<'a, G> System<'a> for CacheSelectionOrderSystem<G> where
    G: PartialEq + Send + Sync + 'static, 

impl<'s> System<'s> for UiSoundSystem

impl<'a> System<'a> for TextEditingMouseSystem

impl<'a> System<'a> for TextEditingInputSystem

impl<'a> System<'a> for AutoFovSystem

impl<'a> System<'a> for FpsCounterSystem

impl<'a> System<'a> for CameraOrthoSystem

impl<'a> System<'a> for DestroyAtTimeSystem

impl<'a> System<'a> for DestroyInTimeSystem

impl<'a> System<'a> for WindowSystem

impl<'a> System<'a> for UiEventHandlerSystem

impl<'a, P> System<'a> for HierarchySystem<P> where
    P: Component + Parent + Send + Sync + 'static,
    P::Storage: Tracked