pub struct Instruction<S: Symbol> {
pub head: Head<S>,
pub tail: Tail<S>,
}
Expand description
Instruction
is a component of crate::program::Program
. This struct
contains a Head
struct and a Tail
struct and is used as a unit for
instructions in the program.
Instruction
fileds doesn’t needs in control or protection so they
are public.
Fields§
§head: Head<S>
The first part of an instruction contains the state State
and a symbol of the type that implements the Symbol
trait.
tail: Tail<S>
The second part of an instruction contains the state State
,
a symbol of the type that implements the Symbol
trait
and the movement Move
.
Implementations§
Source§impl<S: Symbol> Instruction<S>
impl<S: Symbol> Instruction<S>
Trait Implementations§
Source§impl<S: Clone + Symbol> Clone for Instruction<S>
impl<S: Clone + Symbol> Clone for Instruction<S>
Source§fn clone(&self) -> Instruction<S>
fn clone(&self) -> Instruction<S>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<S: Symbol> Display for Instruction<S>
impl<S: Symbol> Display for Instruction<S>
impl<S: Eq + Symbol> Eq for Instruction<S>
impl<S: Symbol> StructuralPartialEq for Instruction<S>
Auto Trait Implementations§
impl<S> Freeze for Instruction<S>where
S: Freeze,
impl<S> RefUnwindSafe for Instruction<S>where
S: RefUnwindSafe,
impl<S> Send for Instruction<S>where
S: Send,
impl<S> Sync for Instruction<S>where
S: Sync,
impl<S> Unpin for Instruction<S>where
S: Unpin,
impl<S> UnwindSafe for Instruction<S>where
S: 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