[][src]Trait epkard::Node

pub trait Node: Clone {
    type State;
    fn next<F>(self, rt: &mut Runtime<Self, F>) -> Control<Self>
    where
        F: Frontend
; }

A story node in a narrative.

In a branching narrative, a node is a place where the story can split into different branches.

While Nodes themselves should be transient and not hold too much data, they have an associated state that can be mutated.

Associated Types

type State

The state that the node transforms

Loading content...

Required methods

fn next<F>(self, rt: &mut Runtime<Self, F>) -> Control<Self> where
    F: Frontend

Handle the node to transforms the state and determine the next node

The state can be access by derefing the Runtime.

Loading content...

Implementors

Loading content...