[][src]Enum papyrus::cmds::CommandResult

pub enum CommandResult<D> {
    BeginMutBlock,
    EditAlter(EditingIndex),
    EditReplace(EditingIndexString),
    SwitchModule(PathBuf),
    ActionOnReplData(ReplDataAction<D>),
    ActionOnAppData(AppDataAction<D>),
    Empty,
}

The result of a cmdtree action. This result is handed in the repl's evaluating stage, and can alter ReplData or the data D.

Variants

BeginMutBlock

Flag to begin a mutating block.

EditAlter(EditingIndex)

Flag to alter a previous statement, item, or crate.

EditReplace(EditingIndexString)

Replace a previous statement, item, or crate with value.

SwitchModule(PathBuf)

Switch to a module.

ActionOnReplData(ReplDataAction<D>)

Take an action on the ReplData.

ActionOnAppData(AppDataAction<D>)

Take an action on Data.

Empty

A blank variant with no action.

Methods

impl<D> CommandResult<D>[src]

pub fn app_data_fn<F: 'static + Fn(&mut D, &mut dyn Write) -> String>(
    func: F
) -> Self
[src]

Convenience function boxing an action on app data.

pub fn repl_data_fn<F: 'static + Fn(&mut ReplData<D>, &mut dyn Write) -> String>(
    func: F
) -> Self
[src]

Convenience function boxing an action on repl data.

Auto Trait Implementations

impl<D> !RefUnwindSafe for CommandResult<D>

impl<D> !Send for CommandResult<D>

impl<D> !Sync for CommandResult<D>

impl<D> Unpin for CommandResult<D>

impl<D> !UnwindSafe for CommandResult<D>

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> Erased for T[src]

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

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

impl<E> SpecializationError for E[src]

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.