[−][src]Struct gameshell::GameShell
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]
&mut self,
spec: Spec<'_, 'a, Type, String, C>
) -> Result<(), RegError>
Register a command specificator to this gameshell instance
pub fn register_many(
&mut self,
spec: &[Spec<'_, 'a, Type, String, C>]
) -> Result<(), RegError>
[src]
&mut self,
spec: &[Spec<'_, 'a, Type, String, C>]
) -> Result<(), RegError>
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,
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,
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,
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,
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,
C: RefUnwindSafe,
R: RefUnwindSafe,
W: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,