[][src]Enum brainfrsck::instruction::Instruction

pub enum Instruction {
    IncPtr,
    DecPtr,
    IncVal,
    DecVal,
    Output,
    Input,
    SetJump,
    Jump,
    EOF,
    NOP,
    Debug,
}

Provides an interface for different instructions. Essentially a front end enum for this mapping:

  • IncPtr => '>'
  • DecPtr => '<'
  • IncVal => '+'
  • DecVal => '-'
  • Output => '.'
  • Input => ','
  • SetJump => '['
  • Jump => ']'
  • EOF => ';'
  • Debug => '#'
  • NOP => Any other character

Variants

IncPtr
DecPtr
IncVal
DecVal
Output
Input
SetJump
Jump
EOF
NOP
Debug

Methods

impl Instruction[src]

pub fn from_char(instruction: char) -> Self[src]

Gets an Instruction from a char

pub fn as_char(&self) -> char[src]

Gets a char from an Instruction

Trait Implementations

impl Clone for Instruction[src]

impl Copy for Instruction[src]

impl PartialEq<Instruction> for Instruction[src]

impl Display for Instruction[src]

impl Debug for Instruction[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]