Skip to main content

IntoPipeSystem

Struct IntoPipeSystem 

Source
pub struct IntoPipeSystem<A, B, N: PipeSystemName = ()> { /* private fields */ }
Expand description

An IntoSystem creating an instance of PipeSystem.

This struct is created by IntoSystem::pipe(). See its documentation for more.

Implementations§

Source§

impl<A, B> IntoPipeSystem<A, B>

Source

pub const fn new(a: A, b: B) -> Self

Creates a new IntoSystem that pipes two inner systems.

Unless changed, the name of the system will be set to a combination of the names of the inner systems.

Source

pub fn with_name_fn( self, name: impl FnOnce(DebugName, DebugName) -> DebugName, ) -> IntoPipeSystem<A, B, impl PipeSystemName>

Set the name of the output PipeSystem to the output of a function.

The parameters to the function are the names of the two systems. The first system is the one passed as self to IntoSystem::pipe, and the second system is the one passed as a parameter.

Note that when piping multiple systems, they may themselves be PipeSystems!

Source

pub fn with_name( self, name: impl Into<DebugName>, ) -> IntoPipeSystem<A, B, impl PipeSystemName>

Set the name of the output PipeSystem to the given string.

Source

pub fn with_first_name(self) -> IntoPipeSystem<A, B, impl PipeSystemName>

Set the name of the output PipeSystem to the name of the first system.

Note that the “first” system is the one passed as self to IntoSystem::pipe. When piping multiple systems, that may itself by another PipeSystem!

let system = a.pipe(b).pipe(c).with_first_name();
assert_eq!("Pipe(a, b)", &*IntoSystem::into_system(system).name());
let system = a.pipe(b.pipe(c)).with_first_name();
assert_eq!("a", &*IntoSystem::into_system(system).name());
Source

pub fn with_second_name(self) -> IntoPipeSystem<A, B, impl PipeSystemName>

Set the name of the output PipeSystem to the name of the second system.

Note that the “second” system is the one passed as a parameter to IntoSystem::pipe. When piping multiple systems, that may itself by another PipeSystem!

let system = a.pipe(b).pipe(c).with_second_name();
assert_eq!("c", &*IntoSystem::into_system(system).name());
let system = a.pipe(b.pipe(c)).with_second_name();
assert_eq!("Pipe(b, c)", &*IntoSystem::into_system(system).name());

Trait Implementations§

Source§

impl<A: Clone, B: Clone, N: Clone + PipeSystemName> Clone for IntoPipeSystem<A, B, N>

Source§

fn clone(&self) -> IntoPipeSystem<A, B, N>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<A, B, N, IA, OA, IB, OB, MA, MB> IntoSystem<IA, OB, (IsPipeSystemMarker, OA, IB, MA, MB)> for IntoPipeSystem<A, B, N>
where IA: SystemInput, A: IntoSystem<IA, OA, MA>, B: IntoSystem<IB, OB, MB>, N: PipeSystemName, for<'a> IB: SystemInput<Inner<'a> = OA>,

Source§

type System = PipeSystem<<A as IntoSystem<IA, OA, MA>>::System, <B as IntoSystem<IB, OB, MB>>::System>

The type of System that this instance converts into.
Source§

fn into_system(this: Self) -> Self::System

Turns this value into its corresponding System.
Source§

fn pipe<B, BIn, BOut, MarkerB>(self, system: B) -> IntoPipeSystem<Self, B>
where Out: 'static, B: IntoSystem<BIn, BOut, MarkerB>, for<'a> BIn: SystemInput<Inner<'a> = Out>,

Pass the output of this system A into a second system B, creating a new compound system. Read more
Source§

fn map<T, F>(self, f: F) -> IntoAdapterSystem<F, Self>
where F: Send + Sync + 'static + FnMut(Out) -> T,

Pass the output of this system into the passed function f, creating a new system that outputs the value returned from the function. Read more
Source§

fn with_input<T>(self, value: T) -> WithInputWrapper<Self::System, T>
where for<'i> In: SystemInput<Inner<'i> = &'i mut T>, T: Send + Sync + 'static,

Passes a mutable reference to value as input to the system each run, turning it into a system that takes no input. Read more
Source§

fn with_input_from<T>(self) -> WithInputFromWrapper<Self::System, T>
where for<'i> In: SystemInput<Inner<'i> = &'i mut T>, T: FromWorld + Send + Sync + 'static,

Passes a mutable reference to a value of type T created via FromWorld as input to the system each run, turning it into a system that takes no input. Read more
Source§

fn system_type_id(&self) -> TypeId

Get the TypeId of the System produced after calling into_system.

Auto Trait Implementations§

§

impl<A, B, N> Freeze for IntoPipeSystem<A, B, N>
where A: Freeze, B: Freeze, N: Freeze,

§

impl<A, B, N> RefUnwindSafe for IntoPipeSystem<A, B, N>

§

impl<A, B, N> Send for IntoPipeSystem<A, B, N>
where A: Send, B: Send, N: Send,

§

impl<A, B, N> Sync for IntoPipeSystem<A, B, N>
where A: Sync, B: Sync, N: Sync,

§

impl<A, B, N> Unpin for IntoPipeSystem<A, B, N>
where A: Unpin, B: Unpin, N: Unpin,

§

impl<A, B, N> UnsafeUnpin for IntoPipeSystem<A, B, N>

§

impl<A, B, N> UnwindSafe for IntoPipeSystem<A, B, N>
where A: UnwindSafe, B: UnwindSafe, N: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ConditionalSend for T
where T: Send,

Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSend for T
where T: Any + Send,

Source§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<E, M, T> IntoEntityObserver<(E, M)> for T

Source§

fn into_observer_for_entity(self, entity: Entity) -> Observer

Converts this type into an Observer that watches the given entity.
Source§

impl<E, M, T> IntoObserver<(E, M)> for T
where E: EventPattern, T: IntoObserverSystem<E, M>,

Source§

fn into_observer(self) -> Observer

Converts this type into an Observer.
Source§

impl<E, M, Out, S> IntoObserverSystem<E, M, Out> for S
where E: EventPattern + 'static, S: IntoSystem<On<'static, 'static, E>, Out, M> + Send + 'static, <S as IntoSystem<On<'static, 'static, E>, Out, M>>::System: ObserverSystem<E, Out>,

Source§

type System = <S as IntoSystem<On<'static, 'static, E>, Out, M>>::System

The type of System that this instance converts into.
Source§

fn into_system(this: S) -> <S as IntoObserverSystem<E, M, Out>>::System

Turns this value into its corresponding System.
Source§

impl<T> IntoResult<T> for T

Source§

fn into_result(self) -> Result<T, RunSystemError>

Converts this type into the system output type.
Source§

impl<F, Marker> IntoScheduleConfigs<Box<dyn System<In = (), Out = ()>>, Marker> for F
where F: IntoSystem<(), (), Marker>,

Source§

fn into_configs(self) -> ScheduleConfigs<Box<dyn System<In = (), Out = ()>>>

Convert into a ScheduleConfigs.
Source§

fn in_set(self, set: impl SystemSet) -> ScheduleConfigs<T>

Add these systems to the provided set.
Source§

fn before<M>(self, set: impl IntoSystemSet<M>) -> ScheduleConfigs<T>

Runs before all systems in set. If self has any systems that produce Commands or other Deferred operations, all systems in set will see their effect. Read more
Source§

fn after<M>(self, set: impl IntoSystemSet<M>) -> ScheduleConfigs<T>

Run after all systems in set. If set has any systems that produce Commands or other Deferred operations, all systems in self will see their effect. Read more
Source§

fn before_ignore_deferred<M>( self, set: impl IntoSystemSet<M>, ) -> ScheduleConfigs<T>

Run before all systems in set. Read more
Source§

fn after_ignore_deferred<M>( self, set: impl IntoSystemSet<M>, ) -> ScheduleConfigs<T>

Run after all systems in set. Read more
Source§

fn before_weak<M>(self, set: impl IntoSystemSet<M>) -> ScheduleConfigs<T>

Run before the systems in set that self actually conflicts with, leaving the rest unordered. Read more
Source§

fn after_weak<M>(self, set: impl IntoSystemSet<M>) -> ScheduleConfigs<T>

Run after the systems in set that self actually conflicts with, leaving the rest unordered. Read more
Source§

fn distributive_run_if<M>( self, condition: impl SystemCondition<M> + Clone, ) -> ScheduleConfigs<T>

Add a run condition to each contained system. Read more
Source§

fn run_if<M>(self, condition: impl SystemCondition<M>) -> ScheduleConfigs<T>

Run the systems only if the SystemCondition is true. Read more
Source§

fn ambiguous_with<M>(self, set: impl IntoSystemSet<M>) -> ScheduleConfigs<T>

Suppress warnings and errors that would result from these systems having ambiguities (conflicting access but indeterminate order) with systems in set.
Source§

fn ambiguous_with_all(self) -> ScheduleConfigs<T>

Suppress warnings and errors that would result from these systems having ambiguities (conflicting access but indeterminate order) with any other system.
Source§

fn chain(self) -> ScheduleConfigs<T>

Treat this collection as a sequence of systems. Read more
Source§

fn chain_ignore_deferred(self) -> ScheduleConfigs<T>

Treat this collection as a sequence of systems. Read more
Source§

fn chain_weak(self) -> ScheduleConfigs<T>

Treat this collection as a sequence, but only order successive systems that actually conflict and leave the rest unordered. Read more
Source§

impl<A> Is for A
where A: Any,

Source§

fn is<T>() -> bool
where T: Any,

Checks if the current type “is” another type, using a TypeId equality comparison. This is most useful in the context of generic logic. Read more
Source§

impl<E, M, T> ObserverSystemExt<E, M> for T
where E: EventPattern, T: IntoObserverSystem<E, M>,

Source§

fn run_if<C, CM>(self, condition: C) -> ObserverWithCondition<E, M, Self>
where C: SystemCondition<CM>,

Adds a run condition to this observer system. Read more
Source§

impl<T> Template for T
where T: Clone + Unpin,

Source§

type Output = T

The type of value produced by this Template.
Source§

fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>

Uses this template and the given entity context to produce a Template::Output.
Source§

fn clone_template(&self) -> T

Clones this template. See Clone.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> TypeData for T
where T: 'static + Send + Sync + Clone,

Source§

fn clone_type_data(&self) -> Box<dyn TypeData>

Creates a type-erased clone of self.