Skip to main content

Crate pasaka

Crate pasaka 

Source
Expand description

§Example

use pasaka::*;

#[passage]
fn Example(mut h: PassageHandle, state: i32) -> PassageResult {
    h.text("Text can be outputted using .text.")
        .text("It can also be chained.")
        .text(format!("Count: {state}"));

    h.choice()
        .option("The expression is usually a choice", |h, state| {
            h.passage(Example, state + 1)
        })
        .build(state)
}

Modules§

cli
macro_support
Re-exports for use inside of the #[passage] macro.
web

Structs§

ChoiceHandle
ChoiceResult
CliRunner
DefaultRunner
Engine
Passage
Combination of a passage name together with its state.
PassageHandle
Handle provided to passages as first argument.
PassageResult
WebRunner

Traits§

PassageImpl

Functions§

register_passage
Register passage to the global registry. You should not call this function, as the #[passage] macro calls it for you.

Attribute Macros§

passage
Mark function as a passage.