[][src]Struct gameshell::GameShell

pub struct GameShell<'a, C, R: Read, W: Write> { /* fields omitted */ }

The main virtual machine wrapper for a game shell

This wrapper consumes an input and output stream through which it writes messages.

Methods

impl<'a, C, R: Read, W: Write> GameShell<'a, C, R, W>[src]

pub fn new(context: C, reader: R, writer: W) -> Self[src]

Spawn a new gameshell with a given context and readers/writers

pub fn evaluator(&mut self) -> &mut Evaluator<'a, C>[src]

Get a reference to the current evaluator

pub fn context(&self) -> &C[src]

Get a reference to the current context

pub fn context_mut(&mut self) -> &mut C[src]

Get a mutable reference to the current context

pub fn register(
    &mut self,
    spec: Spec<'_, 'a, Type, String, C>
) -> Result<(), RegError>
[src]

Register a command specificator to this gameshell instance

pub fn register_many(
    &mut self,
    spec: &[Spec<'_, 'a, Type, String, C>]
) -> Result<(), RegError>
[src]

Register multiple command specifications to this gameshell instance

Trait Implementations

impl<'a, C, R: Read, W: Write> IncConsumer for GameShell<'a, C, R, W>[src]

Auto Trait Implementations

impl<'a, C, R, W> Send for GameShell<'a, C, R, W> where
    C: Send,
    R: Send,
    W: Send

impl<'a, C, R, W> Unpin for GameShell<'a, C, R, W> where
    C: Unpin,
    R: Unpin,
    W: Unpin

impl<'a, C, R, W> Sync for GameShell<'a, C, R, W> where
    C: Sync,
    R: Sync,
    W: Sync

impl<'a, C, R, W> UnwindSafe for GameShell<'a, C, R, W> where
    C: UnwindSafe,
    R: UnwindSafe,
    W: UnwindSafe

impl<'a, C, R, W> RefUnwindSafe for GameShell<'a, C, R, W> where
    C: RefUnwindSafe,
    R: RefUnwindSafe,
    W: RefUnwindSafe

Blanket Implementations

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

impl<T> From<T> for T[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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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