[][src]Struct kingslayer::Cli

pub struct Cli { /* fields omitted */ }

The Cli type provides a simple way to interface into the mechanics of Kingslayer with custom worlds

Methods

impl Cli[src]

pub fn from_file(path: &str) -> Self[src]

Construct from a RON file

pub fn from_ron_str(ron: &str) -> Self[src]

Construct from a string containing RON

pub fn prompt() -> String[src]

Prompts the user for input from stdin

pub fn help() -> CmdResult[src]

Returns a helpful list of game commands

pub fn start(&self)[src]

Start a typical game for the command line

pub fn ask(&self, input: &str) -> String[src]

Handle user input and return the results of commands and events

pub fn add_element(&self, room: &str, el: Element)[src]

pub fn add_item(&self, room: &str, item: Item)[src]

pub fn spawn_enemy(&self, room: &str, enemy: Enemy)[src]

Trait Implementations

impl Clone for Cli[src]

impl Debug for Cli[src]

impl Default for Cli[src]

impl<'de> Deserialize<'de> for Cli[src]

impl Serialize for Cli[src]

Auto Trait Implementations

impl !RefUnwindSafe for Cli

impl Send for Cli

impl !Sync for Cli

impl Unpin for Cli

impl UnwindSafe for Cli

Blanket Implementations

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

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

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 = 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<V, T> VZip<V> for T where
    V: MultiLane<T>,