pub struct Machine<R: Recipe> { /* private fields */ }Expand description
Basic machine that can process recipes.
Implementations§
Source§impl<R: RecipeEx> Machine<R>
impl<R: RecipeEx> Machine<R>
Sourcepub fn inputs(&mut self, tick: &Tick) -> &mut R::Inputs
pub fn inputs(&mut self, tick: &Tick) -> &mut R::Inputs
Update internal state and access input buffers.
Sourcepub fn outputs(&mut self, tick: &Tick) -> &mut R::Outputs
pub fn outputs(&mut self, tick: &Tick) -> &mut R::Outputs
Update internal state and access output buffers.
Sourcepub fn change_recipe<R2: RecipeEx>(
self,
recipe: R2,
) -> Result<Machine<R2>, MachineNotEmptyError<Self>>
pub fn change_recipe<R2: RecipeEx>( self, recipe: R2, ) -> Result<Machine<R2>, MachineNotEmptyError<Self>>
Changes the Recipe of the machine.
Returns the original machine if the machine has any inputs or outputs.
Trait Implementations§
Auto Trait Implementations§
impl<R> Freeze for Machine<R>
impl<R> RefUnwindSafe for Machine<R>
impl<R> Send for Machine<R>
impl<R> Sync for Machine<R>
impl<R> Unpin for Machine<R>
impl<R> UnwindSafe for Machine<R>
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