Skip to content

hero.baobab.example_actor #

Example Actor Module

The Example Actor module serves as a reference and testable example of an actor module within the Baobab system. It showcases how actor modules are generated from specifications and can be parsed back into specifications.

Purpose

This module is designed with two primary objectives:1. Developer Reference

Provide a concrete example of the final output of a generated actor. Developers working on Baobab can use this as a reference for:* Understanding the structure of actor modules.

  • Programming against the actor specification format.
  1. Test Code Generation

Offer a compilable, generatable actor module to:* Validate the functionality of Baobab’s code generation tools.

  • Ensure compatibility and correctness of generated modules.

Features

  • Demonstrates the structure of actor modules generated from specifications.
  • Allows developers to see both the specification and its parsed representation.
  • Can be regenerated and compiled as part of the Baobab testing process.

How to Use

  • Use this module as a template when developing or testing new actor specifications.
  • Leverage it to verify Baobab’s code generation processes by regenerating and compiling it as needed.

This module is integral to Baobab’s development and testing, providing both clarity and reliability for the actor generation workflow.

Example Actor

The Example Actor module represents and exemplifies an actor module that is generated from specification and can be parsed. This module serves two purposes:

  1. Provide a reference on the end output of a generated actor for developers working on baobab to program against
  2. Provide a generatable, compilable module to ensure and test code generate functionalities utilized in baobab

fn run #

fn run() !

fn run_server #

fn run_server(params RunParams) !

fn (ExampleActor) handle #

fn (mut a ExampleActor) handle(method string, data string) !string