pub struct ReplayPrompt<P> { /* private fields */ }
Expand description

Prompt decorator which logs responses and can replay them.

This prompt is used to facilitate undo and restart operations while interactively deserialising. The deserialiser itself cannot be stepped backwards once a response has been submitted. It’s necessary to start the deserialiser again, but the ReplayPrompt can quickly bring it up to the correct point by replaying its log.

Implementations

Clear log and disable recording.

Start recording responses.

Replay log and continue recording new responses.

Remove the last n responses from the log.

Truncate the log to the first nth responses in the log.

Trait Implementations

Returns true if the prompt is currently interactive.

Requests a response given a prompt message and optional variants.

Reports an informative or error message to the prompt.

Begins a new named scope.

Ends the current scope.

Sends a response to the prompt.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.