pub struct Program<'env> { /* private fields */ }
Expand description
An instance of a Befunge-98 program.
This manages all data associated to the running program, like the addressable space, all currently active instruction pointers and program configuration.
Implementations§
Source§impl<'env> Program<'env>
impl<'env> Program<'env>
Sourcepub fn step_single(&mut self)
pub fn step_single(&mut self)
Executes the current instruction of a single instruction pointer.
The IP will execute a single ‘tick’ as defined by the Funge-98 specification and then advance its position up to the next command, skipping any intermediate spaces and areas delimited by semicolons and wrapping around to the other side of the program if it steps out of the program area.
Sourcepub fn step_all(&mut self)
pub fn step_all(&mut self)
Executes the current instruction of every active instruction pointer.
Similarly to step_single
, each IP will be advanced to its next
command.
Auto Trait Implementations§
impl<'env> Freeze for Program<'env>
impl<'env> !RefUnwindSafe for Program<'env>
impl<'env> !Send for Program<'env>
impl<'env> !Sync for Program<'env>
impl<'env> Unpin for Program<'env>
impl<'env> !UnwindSafe for Program<'env>
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