pub struct FnOnceSystem<Req, F> { /* private fields */ }Expand description
A system that is FnOnce.
The purpose of this type is to remove boilerplate code related to system
declaration when clients make systems using functions. Unlike types like
struct or enum, functions have parameters which explains what types the
functions need. The crate exploits the information then makes boilerplate
code for clients.
Plus, there is FnSystem for FnMut.
- Req - Arbitrary length of parameters of
F. - F - Function.
Trait Implementations§
Source§impl<Req, F> Debug for FnOnceSystem<Req, F>where
Self: System,
impl<Req, F> Debug for FnOnceSystem<Req, F>where
Self: System,
Source§impl<F, EW> From<F> for FnOnceSystem<(Ph, Ph, Ph, Ph, EW), F>
impl<F, EW> From<F> for FnOnceSystem<(Ph, Ph, Ph, Ph, EW), F>
Source§impl<F> From<F> for FnOnceSystem<(Ph, Ph, Ph, Ph, Ph), F>where
F: FnOnce(),
impl<F> From<F> for FnOnceSystem<(Ph, Ph, Ph, Ph, Ph), F>where
F: FnOnce(),
Source§impl<F, RW, EW> From<F> for FnOnceSystem<(Ph, Ph, Ph, RW, EW), F>
impl<F, RW, EW> From<F> for FnOnceSystem<(Ph, Ph, Ph, RW, EW), F>
Source§impl<F, RW> From<F> for FnOnceSystem<(Ph, Ph, Ph, RW, Ph), F>
impl<F, RW> From<F> for FnOnceSystem<(Ph, Ph, Ph, RW, Ph), F>
Source§impl<F, RR, EW> From<F> for FnOnceSystem<(Ph, Ph, RR, Ph, EW), F>
impl<F, RR, EW> From<F> for FnOnceSystem<(Ph, Ph, RR, Ph, EW), F>
Source§impl<F, RR> From<F> for FnOnceSystem<(Ph, Ph, RR, Ph, Ph), F>
impl<F, RR> From<F> for FnOnceSystem<(Ph, Ph, RR, Ph, Ph), F>
Source§impl<F, RR, RW, EW> From<F> for FnOnceSystem<(Ph, Ph, RR, RW, EW), F>
impl<F, RR, RW, EW> From<F> for FnOnceSystem<(Ph, Ph, RR, RW, EW), F>
Source§impl<F, RR, RW> From<F> for FnOnceSystem<(Ph, Ph, RR, RW, Ph), F>
impl<F, RR, RW> From<F> for FnOnceSystem<(Ph, Ph, RR, RW, Ph), F>
Source§impl<F, W, EW> From<F> for FnOnceSystem<(Ph, W, Ph, Ph, EW), F>
impl<F, W, EW> From<F> for FnOnceSystem<(Ph, W, Ph, Ph, EW), F>
Source§impl<F, W> From<F> for FnOnceSystem<(Ph, W, Ph, Ph, Ph), F>
impl<F, W> From<F> for FnOnceSystem<(Ph, W, Ph, Ph, Ph), F>
Source§impl<F, W, RW, EW> From<F> for FnOnceSystem<(Ph, W, Ph, RW, EW), F>
impl<F, W, RW, EW> From<F> for FnOnceSystem<(Ph, W, Ph, RW, EW), F>
Source§impl<F, W, RW> From<F> for FnOnceSystem<(Ph, W, Ph, RW, Ph), F>
impl<F, W, RW> From<F> for FnOnceSystem<(Ph, W, Ph, RW, Ph), F>
Source§impl<F, W, RR, EW> From<F> for FnOnceSystem<(Ph, W, RR, Ph, EW), F>
impl<F, W, RR, EW> From<F> for FnOnceSystem<(Ph, W, RR, Ph, EW), F>
Source§impl<F, W, RR> From<F> for FnOnceSystem<(Ph, W, RR, Ph, Ph), F>
impl<F, W, RR> From<F> for FnOnceSystem<(Ph, W, RR, Ph, Ph), F>
Source§impl<F, W, RR, RW, EW> From<F> for FnOnceSystem<(Ph, W, RR, RW, EW), F>
impl<F, W, RR, RW, EW> From<F> for FnOnceSystem<(Ph, W, RR, RW, EW), F>
Source§impl<F, W, RR, RW> From<F> for FnOnceSystem<(Ph, W, RR, RW, Ph), F>
impl<F, W, RR, RW> From<F> for FnOnceSystem<(Ph, W, RR, RW, Ph), F>
Source§impl<F, R, EW> From<F> for FnOnceSystem<(R, Ph, Ph, Ph, EW), F>
impl<F, R, EW> From<F> for FnOnceSystem<(R, Ph, Ph, Ph, EW), F>
Source§impl<F, R> From<F> for FnOnceSystem<(R, Ph, Ph, Ph, Ph), F>
impl<F, R> From<F> for FnOnceSystem<(R, Ph, Ph, Ph, Ph), F>
Source§impl<F, R, RW, EW> From<F> for FnOnceSystem<(R, Ph, Ph, RW, EW), F>
impl<F, R, RW, EW> From<F> for FnOnceSystem<(R, Ph, Ph, RW, EW), F>
Source§impl<F, R, RW> From<F> for FnOnceSystem<(R, Ph, Ph, RW, Ph), F>
impl<F, R, RW> From<F> for FnOnceSystem<(R, Ph, Ph, RW, Ph), F>
Source§impl<F, R, RR, EW> From<F> for FnOnceSystem<(R, Ph, RR, Ph, EW), F>
impl<F, R, RR, EW> From<F> for FnOnceSystem<(R, Ph, RR, Ph, EW), F>
Source§impl<F, R, RR> From<F> for FnOnceSystem<(R, Ph, RR, Ph, Ph), F>
impl<F, R, RR> From<F> for FnOnceSystem<(R, Ph, RR, Ph, Ph), F>
Source§impl<F, R, RR, RW, EW> From<F> for FnOnceSystem<(R, Ph, RR, RW, EW), F>
impl<F, R, RR, RW, EW> From<F> for FnOnceSystem<(R, Ph, RR, RW, EW), F>
Source§impl<F, R, RR, RW> From<F> for FnOnceSystem<(R, Ph, RR, RW, Ph), F>
impl<F, R, RR, RW> From<F> for FnOnceSystem<(R, Ph, RR, RW, Ph), F>
Source§impl<F, R, W, EW> From<F> for FnOnceSystem<(R, W, Ph, Ph, EW), F>
impl<F, R, W, EW> From<F> for FnOnceSystem<(R, W, Ph, Ph, EW), F>
Source§impl<F, R, W> From<F> for FnOnceSystem<(R, W, Ph, Ph, Ph), F>
impl<F, R, W> From<F> for FnOnceSystem<(R, W, Ph, Ph, Ph), F>
Source§impl<F, R, W, RW, EW> From<F> for FnOnceSystem<(R, W, Ph, RW, EW), F>
impl<F, R, W, RW, EW> From<F> for FnOnceSystem<(R, W, Ph, RW, EW), F>
Source§impl<F, R, W, RW> From<F> for FnOnceSystem<(R, W, Ph, RW, Ph), F>
impl<F, R, W, RW> From<F> for FnOnceSystem<(R, W, Ph, RW, Ph), F>
Source§impl<F, R, W, RR, EW> From<F> for FnOnceSystem<(R, W, RR, Ph, EW), F>
impl<F, R, W, RR, EW> From<F> for FnOnceSystem<(R, W, RR, Ph, EW), F>
Source§impl<F, R, W, RR> From<F> for FnOnceSystem<(R, W, RR, Ph, Ph), F>
impl<F, R, W, RR> From<F> for FnOnceSystem<(R, W, RR, Ph, Ph), F>
Source§impl<F, R, W, RR, RW, EW> From<F> for FnOnceSystem<(R, W, RR, RW, EW), F>
impl<F, R, W, RR, RW, EW> From<F> for FnOnceSystem<(R, W, RR, RW, EW), F>
Source§impl<F, R, W, RR, RW> From<F> for FnOnceSystem<(R, W, RR, RW, Ph), F>
impl<F, R, W, RR, RW> From<F> for FnOnceSystem<(R, W, RR, RW, Ph), F>
Source§impl<F, EW> System for FnOnceSystem<(Ph, Ph, Ph, Ph, EW), F>
impl<F, EW> System for FnOnceSystem<(Ph, Ph, Ph, Ph, EW), F>
type Request = ((), (), (), (), EW)
Source§fn run(&mut self, _resp: Response<'_, Self::Request>)
fn run(&mut self, _resp: Response<'_, Self::Request>)
Runs the system with the response corresponding to its request.
Source§fn on_transition(&mut self, from: SystemState, to: SystemState)
fn on_transition(&mut self, from: SystemState, to: SystemState)
Does a certain behavior on transitions of system state. Read more
Source§impl<F> System for FnOnceSystem<(Ph, Ph, Ph, Ph, Ph), F>
impl<F> System for FnOnceSystem<(Ph, Ph, Ph, Ph, Ph), F>
type Request = ((), (), (), (), ())
Source§fn run(&mut self, _resp: Response<'_, Self::Request>)
fn run(&mut self, _resp: Response<'_, Self::Request>)
Runs the system with the response corresponding to its request.
Source§fn on_transition(&mut self, from: SystemState, to: SystemState)
fn on_transition(&mut self, from: SystemState, to: SystemState)
Does a certain behavior on transitions of system state. Read more
Source§impl<F, RW, EW> System for FnOnceSystem<(Ph, Ph, Ph, RW, EW), F>
impl<F, RW, EW> System for FnOnceSystem<(Ph, Ph, Ph, RW, EW), F>
type Request = ((), (), (), RW, EW)
Source§fn run(&mut self, _resp: Response<'_, Self::Request>)
fn run(&mut self, _resp: Response<'_, Self::Request>)
Runs the system with the response corresponding to its request.
Source§fn on_transition(&mut self, from: SystemState, to: SystemState)
fn on_transition(&mut self, from: SystemState, to: SystemState)
Does a certain behavior on transitions of system state. Read more
Source§impl<F, RW> System for FnOnceSystem<(Ph, Ph, Ph, RW, Ph), F>
impl<F, RW> System for FnOnceSystem<(Ph, Ph, Ph, RW, Ph), F>
type Request = ((), (), (), RW, ())
Source§fn run(&mut self, _resp: Response<'_, Self::Request>)
fn run(&mut self, _resp: Response<'_, Self::Request>)
Runs the system with the response corresponding to its request.
Source§fn on_transition(&mut self, from: SystemState, to: SystemState)
fn on_transition(&mut self, from: SystemState, to: SystemState)
Does a certain behavior on transitions of system state. Read more
Source§impl<F, RR, EW> System for FnOnceSystem<(Ph, Ph, RR, Ph, EW), F>
impl<F, RR, EW> System for FnOnceSystem<(Ph, Ph, RR, Ph, EW), F>
type Request = ((), (), RR, (), EW)
Source§fn run(&mut self, _resp: Response<'_, Self::Request>)
fn run(&mut self, _resp: Response<'_, Self::Request>)
Runs the system with the response corresponding to its request.
Source§fn on_transition(&mut self, from: SystemState, to: SystemState)
fn on_transition(&mut self, from: SystemState, to: SystemState)
Does a certain behavior on transitions of system state. Read more
Source§impl<F, RR> System for FnOnceSystem<(Ph, Ph, RR, Ph, Ph), F>
impl<F, RR> System for FnOnceSystem<(Ph, Ph, RR, Ph, Ph), F>
type Request = ((), (), RR, (), ())
Source§fn run(&mut self, _resp: Response<'_, Self::Request>)
fn run(&mut self, _resp: Response<'_, Self::Request>)
Runs the system with the response corresponding to its request.
Source§fn on_transition(&mut self, from: SystemState, to: SystemState)
fn on_transition(&mut self, from: SystemState, to: SystemState)
Does a certain behavior on transitions of system state. Read more
Source§impl<F, RR, RW, EW> System for FnOnceSystem<(Ph, Ph, RR, RW, EW), F>
impl<F, RR, RW, EW> System for FnOnceSystem<(Ph, Ph, RR, RW, EW), F>
type Request = ((), (), RR, RW, EW)
Source§fn run(&mut self, _resp: Response<'_, Self::Request>)
fn run(&mut self, _resp: Response<'_, Self::Request>)
Runs the system with the response corresponding to its request.
Source§fn on_transition(&mut self, from: SystemState, to: SystemState)
fn on_transition(&mut self, from: SystemState, to: SystemState)
Does a certain behavior on transitions of system state. Read more
Source§impl<F, RR, RW> System for FnOnceSystem<(Ph, Ph, RR, RW, Ph), F>
impl<F, RR, RW> System for FnOnceSystem<(Ph, Ph, RR, RW, Ph), F>
type Request = ((), (), RR, RW, ())
Source§fn run(&mut self, _resp: Response<'_, Self::Request>)
fn run(&mut self, _resp: Response<'_, Self::Request>)
Runs the system with the response corresponding to its request.
Source§fn on_transition(&mut self, from: SystemState, to: SystemState)
fn on_transition(&mut self, from: SystemState, to: SystemState)
Does a certain behavior on transitions of system state. Read more
Source§impl<F, W, EW> System for FnOnceSystem<(Ph, W, Ph, Ph, EW), F>
impl<F, W, EW> System for FnOnceSystem<(Ph, W, Ph, Ph, EW), F>
Source§impl<F, W> System for FnOnceSystem<(Ph, W, Ph, Ph, Ph), F>
impl<F, W> System for FnOnceSystem<(Ph, W, Ph, Ph, Ph), F>
Source§impl<F, W, RW, EW> System for FnOnceSystem<(Ph, W, Ph, RW, EW), F>
impl<F, W, RW, EW> System for FnOnceSystem<(Ph, W, Ph, RW, EW), F>
Source§impl<F, W, RW> System for FnOnceSystem<(Ph, W, Ph, RW, Ph), F>
impl<F, W, RW> System for FnOnceSystem<(Ph, W, Ph, RW, Ph), F>
Source§impl<F, W, RR, EW> System for FnOnceSystem<(Ph, W, RR, Ph, EW), F>
impl<F, W, RR, EW> System for FnOnceSystem<(Ph, W, RR, Ph, EW), F>
Source§impl<F, W, RR> System for FnOnceSystem<(Ph, W, RR, Ph, Ph), F>
impl<F, W, RR> System for FnOnceSystem<(Ph, W, RR, Ph, Ph), F>
Source§impl<F, W, RR, RW, EW> System for FnOnceSystem<(Ph, W, RR, RW, EW), F>
impl<F, W, RR, RW, EW> System for FnOnceSystem<(Ph, W, RR, RW, EW), F>
type Request = ((), W, RR, RW, EW)
Source§fn run(&mut self, _resp: Response<'_, Self::Request>)
fn run(&mut self, _resp: Response<'_, Self::Request>)
Runs the system with the response corresponding to its request.
Source§fn on_transition(&mut self, from: SystemState, to: SystemState)
fn on_transition(&mut self, from: SystemState, to: SystemState)
Does a certain behavior on transitions of system state. Read more
Source§impl<F, W, RR, RW> System for FnOnceSystem<(Ph, W, RR, RW, Ph), F>
impl<F, W, RR, RW> System for FnOnceSystem<(Ph, W, RR, RW, Ph), F>
Source§impl<F, R, EW> System for FnOnceSystem<(R, Ph, Ph, Ph, EW), F>
impl<F, R, EW> System for FnOnceSystem<(R, Ph, Ph, Ph, EW), F>
Source§impl<F, R> System for FnOnceSystem<(R, Ph, Ph, Ph, Ph), F>
impl<F, R> System for FnOnceSystem<(R, Ph, Ph, Ph, Ph), F>
Source§impl<F, R, RW, EW> System for FnOnceSystem<(R, Ph, Ph, RW, EW), F>
impl<F, R, RW, EW> System for FnOnceSystem<(R, Ph, Ph, RW, EW), F>
Source§impl<F, R, RW> System for FnOnceSystem<(R, Ph, Ph, RW, Ph), F>
impl<F, R, RW> System for FnOnceSystem<(R, Ph, Ph, RW, Ph), F>
Source§impl<F, R, RR, EW> System for FnOnceSystem<(R, Ph, RR, Ph, EW), F>
impl<F, R, RR, EW> System for FnOnceSystem<(R, Ph, RR, Ph, EW), F>
Source§impl<F, R, RR> System for FnOnceSystem<(R, Ph, RR, Ph, Ph), F>
impl<F, R, RR> System for FnOnceSystem<(R, Ph, RR, Ph, Ph), F>
Source§impl<F, R, RR, RW, EW> System for FnOnceSystem<(R, Ph, RR, RW, EW), F>
impl<F, R, RR, RW, EW> System for FnOnceSystem<(R, Ph, RR, RW, EW), F>
type Request = (R, (), RR, RW, EW)
Source§fn run(&mut self, _resp: Response<'_, Self::Request>)
fn run(&mut self, _resp: Response<'_, Self::Request>)
Runs the system with the response corresponding to its request.
Source§fn on_transition(&mut self, from: SystemState, to: SystemState)
fn on_transition(&mut self, from: SystemState, to: SystemState)
Does a certain behavior on transitions of system state. Read more
Source§impl<F, R, RR, RW> System for FnOnceSystem<(R, Ph, RR, RW, Ph), F>
impl<F, R, RR, RW> System for FnOnceSystem<(R, Ph, RR, RW, Ph), F>
Source§impl<F, R, W, EW> System for FnOnceSystem<(R, W, Ph, Ph, EW), F>
impl<F, R, W, EW> System for FnOnceSystem<(R, W, Ph, Ph, EW), F>
Source§impl<F, R, W> System for FnOnceSystem<(R, W, Ph, Ph, Ph), F>
impl<F, R, W> System for FnOnceSystem<(R, W, Ph, Ph, Ph), F>
Source§impl<F, R, W, RW, EW> System for FnOnceSystem<(R, W, Ph, RW, EW), F>
impl<F, R, W, RW, EW> System for FnOnceSystem<(R, W, Ph, RW, EW), F>
type Request = (R, W, (), RW, EW)
Source§fn run(&mut self, _resp: Response<'_, Self::Request>)
fn run(&mut self, _resp: Response<'_, Self::Request>)
Runs the system with the response corresponding to its request.
Source§fn on_transition(&mut self, from: SystemState, to: SystemState)
fn on_transition(&mut self, from: SystemState, to: SystemState)
Does a certain behavior on transitions of system state. Read more
Source§impl<F, R, W, RW> System for FnOnceSystem<(R, W, Ph, RW, Ph), F>
impl<F, R, W, RW> System for FnOnceSystem<(R, W, Ph, RW, Ph), F>
Source§impl<F, R, W, RR, EW> System for FnOnceSystem<(R, W, RR, Ph, EW), F>
impl<F, R, W, RR, EW> System for FnOnceSystem<(R, W, RR, Ph, EW), F>
type Request = (R, W, RR, (), EW)
Source§fn run(&mut self, _resp: Response<'_, Self::Request>)
fn run(&mut self, _resp: Response<'_, Self::Request>)
Runs the system with the response corresponding to its request.
Source§fn on_transition(&mut self, from: SystemState, to: SystemState)
fn on_transition(&mut self, from: SystemState, to: SystemState)
Does a certain behavior on transitions of system state. Read more
Source§impl<F, R, W, RR> System for FnOnceSystem<(R, W, RR, Ph, Ph), F>
impl<F, R, W, RR> System for FnOnceSystem<(R, W, RR, Ph, Ph), F>
Source§impl<F, R, W, RR, RW, EW> System for FnOnceSystem<(R, W, RR, RW, EW), F>
impl<F, R, W, RR, RW, EW> System for FnOnceSystem<(R, W, RR, RW, EW), F>
type Request = (R, W, RR, RW, EW)
Source§fn run(&mut self, _resp: Response<'_, Self::Request>)
fn run(&mut self, _resp: Response<'_, Self::Request>)
Runs the system with the response corresponding to its request.
Source§fn on_transition(&mut self, from: SystemState, to: SystemState)
fn on_transition(&mut self, from: SystemState, to: SystemState)
Does a certain behavior on transitions of system state. Read more
Source§impl<F, R, W, RR, RW> System for FnOnceSystem<(R, W, RR, RW, Ph), F>
impl<F, R, W, RR, RW> System for FnOnceSystem<(R, W, RR, RW, Ph), F>
type Request = (R, W, RR, RW, ())
Source§fn run(&mut self, _resp: Response<'_, Self::Request>)
fn run(&mut self, _resp: Response<'_, Self::Request>)
Runs the system with the response corresponding to its request.
Source§fn on_transition(&mut self, from: SystemState, to: SystemState)
fn on_transition(&mut self, from: SystemState, to: SystemState)
Does a certain behavior on transitions of system state. Read more
impl<Req, F: Send> Send for FnOnceSystem<Req, F>
Auto Trait Implementations§
impl<Req, F> Freeze for FnOnceSystem<Req, F>where
F: Freeze,
impl<Req, F> RefUnwindSafe for FnOnceSystem<Req, F>where
F: RefUnwindSafe,
Req: RefUnwindSafe,
impl<Req, F> Sync for FnOnceSystem<Req, F>
impl<Req, F> Unpin for FnOnceSystem<Req, F>
impl<Req, F> UnwindSafe for FnOnceSystem<Req, F>where
F: UnwindSafe,
Req: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more