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§
- Choice
Handle - Choice
Result - CliRunner
- Default
Runner - Engine
- Passage
- Combination of a passage name together with its state.
- Passage
Handle - Handle provided to passages as first argument.
- Passage
Result - WebRunner
Traits§
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.