[][src]Struct intcode::IntcodeVM

pub struct IntcodeVM { /* fields omitted */ }

Methods

impl IntcodeVM[src]

pub fn new<D: Into<Vec<i64>>>(data: D) -> Self[src]

pub fn current_opcode(&self) -> Result<i64, ExecutionError>[src]

pub fn get_memory(&self, index: usize) -> Result<i64, ExecutionError>[src]

pub fn set_memory(
    &mut self,
    index: usize,
    value: i64
) -> Result<(), ExecutionError>
[src]

pub fn get_memory_by_pointer(&self, index: usize) -> Result<i64, ExecutionError>[src]

pub fn set_memory_by_pointer(
    &mut self,
    index: usize,
    value: i64
) -> Result<(), ExecutionError>
[src]

pub fn memory(&self) -> &[i64][src]

pub fn step(&mut self) -> Result<bool, ExecutionError>[src]

pub fn run_to_end(&mut self) -> Result<(), ExecutionError>[src]

pub fn halted(&self) -> bool[src]

Trait Implementations

impl Clone for IntcodeVM[src]

impl Debug for IntcodeVM[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = !

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]