Struct bevy::ecs::system::FunctionSystem
[−]pub struct FunctionSystem<In, Out, Param, Marker, F> where
Param: SystemParam, { /* private fields */ }
Expand description
The System
counter part of an ordinary function.
You get this by calling IntoSystem::into_system
on a function that only accepts
SystemParam
s. The output of the system becomes the functions return type, while the input
becomes the functions In
tagged parameter or ()
if no such parameter exists.
FunctionSystem
must be .initialized
before they can be run.
Trait Implementations
impl<In, Out, Param, Marker, F> System for FunctionSystem<In, Out, Param, Marker, F> where
In: 'static,
Out: 'static,
Param: 'static + SystemParam,
Marker: 'static,
F: 'static + SystemParamFunction<In, Out, Param, Marker> + Send + Sync,
impl<In, Out, Param, Marker, F> System for FunctionSystem<In, Out, Param, Marker, F> where
In: 'static,
Out: 'static,
Param: 'static + SystemParam,
Marker: 'static,
F: 'static + SystemParamFunction<In, Out, Param, Marker> + Send + Sync,
type In = In
type In = In
The system’s input. See In
for
FunctionSystem
s. Read more
type Out = Out
type Out = Out
The system’s output.
fn component_access(&self) -> &Access<ComponentId>
fn component_access(&self) -> &Access<ComponentId>
Returns the system’s component Access
.
fn archetype_component_access(&self) -> &Access<ArchetypeComponentId>
fn archetype_component_access(&self) -> &Access<ArchetypeComponentId>
Returns the system’s archetype component Access
.
unsafe fn run_unsafe(
&mut self,
input: <FunctionSystem<In, Out, Param, Marker, F> as System>::In,
world: &World
) -> <FunctionSystem<In, Out, Param, Marker, F> as System>::Out
unsafe fn run_unsafe(
&mut self,
input: <FunctionSystem<In, Out, Param, Marker, F> as System>::In,
world: &World
) -> <FunctionSystem<In, Out, Param, Marker, F> as System>::Out
Runs the system with the given input in the world. Unlike System::run
, this function
takes a shared reference to World
and may therefore break Rust’s aliasing rules, making
it unsafe to call. Read more
fn apply_buffers(&mut self, world: &mut World)
fn initialize(&mut self, world: &mut World)
fn initialize(&mut self, world: &mut World)
Initialize the system.
fn update_archetype_component_access(&mut self, world: &World)
fn update_archetype_component_access(&mut self, world: &World)
Update the system’s archetype component Access
.
fn check_change_tick(&mut self, change_tick: u32)
fn default_labels(&self) -> Vec<SystemLabelId, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn default_labels(&self) -> Vec<SystemLabelId, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
The default labels for the system
Auto Trait Implementations
impl<In, Out, Param, Marker, F> RefUnwindSafe for FunctionSystem<In, Out, Param, Marker, F> where
F: RefUnwindSafe,
<Param as SystemParam>::Fetch: RefUnwindSafe,
impl<In, Out, Param, Marker, F> Send for FunctionSystem<In, Out, Param, Marker, F> where
F: Send,
impl<In, Out, Param, Marker, F> Sync for FunctionSystem<In, Out, Param, Marker, F> where
F: Sync,
impl<In, Out, Param, Marker, F> Unpin for FunctionSystem<In, Out, Param, Marker, F> where
F: Unpin,
<Param as SystemParam>::Fetch: Unpin,
impl<In, Out, Param, Marker, F> UnwindSafe for FunctionSystem<In, Out, Param, Marker, F> where
F: UnwindSafe,
<Param as SystemParam>::Fetch: UnwindSafe,
Blanket Implementations
impl<T, U> AsBindGroupShaderType<U> for T where
U: ShaderType,
&'a T: for<'a> Into<U>,
impl<T, U> AsBindGroupShaderType<U> for T where
U: ShaderType,
&'a T: for<'a> Into<U>,
fn as_bind_group_shader_type(
&self,
_images: &HashMap<Handle<Image>, <Image as RenderAsset>::PreparedAsset, RandomState, Global>
) -> U
fn as_bind_group_shader_type(
&self,
_images: &HashMap<Handle<Image>, <Image as RenderAsset>::PreparedAsset, RandomState, Global>
) -> U
Return the T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist. Read more
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert 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
. Read more
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourcefn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
impl<SystemA, ParamA, Payload, SystemB, ParamB, Out> IntoChainSystem<ParamA, Payload, SystemB, ParamB, Out> for SystemA where
SystemA: IntoSystem<(), Payload, ParamA>,
SystemB: IntoSystem<Payload, Out, ParamB>,
impl<SystemA, ParamA, Payload, SystemB, ParamB, Out> IntoChainSystem<ParamA, Payload, SystemB, ParamB, Out> for SystemA where
SystemA: IntoSystem<(), Payload, ParamA>,
SystemB: IntoSystem<Payload, Out, ParamB>,
fn chain(
self,
system: SystemB
) -> ChainSystem<<SystemA as IntoSystem<(), Payload, ParamA>>::System, <SystemB as IntoSystem<Payload, Out, ParamB>>::System>
fn chain(
self,
system: SystemB
) -> ChainSystem<<SystemA as IntoSystem<(), Payload, ParamA>>::System, <SystemB as IntoSystem<Payload, Out, ParamB>>::System>
Chain this system A
with another system B
creating a new system that feeds system A’s
output into system B
, returning the output of system B
. Read more
impl<S, Params> IntoExclusiveSystem<Params, ExclusiveSystemCoerced> for S where
S: IntoSystem<(), (), Params>,
impl<S, Params> IntoExclusiveSystem<Params, ExclusiveSystemCoerced> for S where
S: IntoSystem<(), (), Params>,
fn exclusive_system(self) -> ExclusiveSystemCoerced
impl<S, Param> IntoRunCriteria<(Box<dyn System<In = (), Out = ShouldRun> + 'static, Global>, Param)> for S where
S: IntoSystem<(), ShouldRun, Param>,
impl<S, Param> IntoRunCriteria<(Box<dyn System<In = (), Out = ShouldRun> + 'static, Global>, Param)> for S where
S: IntoSystem<(), ShouldRun, Param>,
fn into(self) -> RunCriteriaDescriptorOrLabel
impl<In, Out, Sys> IntoSystem<In, Out, AlreadyWasSystem> for Sys where
Sys: System<In = In, Out = Out>,
impl<In, Out, Sys> IntoSystem<In, Out, AlreadyWasSystem> for Sys where
Sys: System<In = In, Out = Out>,
type System = Sys
fn into_system(this: Sys) -> Sys
fn into_system(this: Sys) -> Sys
Turns this value into its corresponding System
.
impl<Params, S> IntoSystemDescriptor<Params> for S where
S: IntoSystem<(), (), Params>,
impl<Params, S> IntoSystemDescriptor<Params> for S where
S: IntoSystem<(), (), Params>,
fn into_descriptor(self) -> SystemDescriptor
impl<S, Params> ParallelSystemDescriptorCoercion<Params> for S where
S: IntoSystem<(), (), Params>,
impl<S, Params> ParallelSystemDescriptorCoercion<Params> for S where
S: IntoSystem<(), (), Params>,
fn with_run_criteria<Marker>(
self,
run_criteria: impl IntoRunCriteria<Marker>
) -> ParallelSystemDescriptor
fn with_run_criteria<Marker>(
self,
run_criteria: impl IntoRunCriteria<Marker>
) -> ParallelSystemDescriptor
Assigns a run criteria to the system. Can be a new descriptor or a label of a run criteria defined elsewhere. Read more
fn label(self, label: impl SystemLabel) -> ParallelSystemDescriptor
fn label(self, label: impl SystemLabel) -> ParallelSystemDescriptor
Assigns a label to the system; there can be more than one, and it doesn’t have to be unique.
fn before<Marker>(
self,
label: impl AsSystemLabel<Marker>
) -> ParallelSystemDescriptor
fn before<Marker>(
self,
label: impl AsSystemLabel<Marker>
) -> ParallelSystemDescriptor
Specifies that the system should run before systems with the given label.
fn after<Marker>(
self,
label: impl AsSystemLabel<Marker>
) -> ParallelSystemDescriptor
fn after<Marker>(
self,
label: impl AsSystemLabel<Marker>
) -> ParallelSystemDescriptor
Specifies that the system should run after systems with the given label.
fn in_ambiguity_set(
self,
set: impl AmbiguitySetLabel
) -> ParallelSystemDescriptor
fn in_ambiguity_set(
self,
set: impl AmbiguitySetLabel
) -> ParallelSystemDescriptor
Specifies that the system is exempt from execution order ambiguity detection with other systems in this set. Read more
impl<S, Param> RunCriteriaDescriptorCoercion<Param> for S where
S: IntoSystem<(), ShouldRun, Param>,
impl<S, Param> RunCriteriaDescriptorCoercion<Param> for S where
S: IntoSystem<(), ShouldRun, Param>,
fn label(self, label: impl RunCriteriaLabel) -> RunCriteriaDescriptor
fn label(self, label: impl RunCriteriaLabel) -> RunCriteriaDescriptor
Assigns a label to the criteria. Must be unique.
fn label_discard_if_duplicate(
self,
label: impl RunCriteriaLabel
) -> RunCriteriaDescriptor
fn label_discard_if_duplicate(
self,
label: impl RunCriteriaLabel
) -> RunCriteriaDescriptor
Assigns a label to the criteria. If the given label is already in use, this criteria will be discarded before initialization. Read more
fn before(self, label: impl RunCriteriaLabel) -> RunCriteriaDescriptor
fn before(self, label: impl RunCriteriaLabel) -> RunCriteriaDescriptor
Specifies that this criteria must be evaluated before a criteria with the given label.
fn after(self, label: impl RunCriteriaLabel) -> RunCriteriaDescriptor
fn after(self, label: impl RunCriteriaLabel) -> RunCriteriaDescriptor
Specifies that this criteria must be evaluated after a criteria with the given label.
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
T: Future, type Output = <T as Future>::Output;
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more