Expand description

Utilities for working with plugins.

Structs

A control action, which can only be taken by one plugin. When run, control actions will return an Option<R> on what their runners return, which will be None if no runner is set.

All the control actions that a plugin can take.

Control actions that pertain to the build process.

Control actions that pertain to the client-side code. As yet, there are none of these.

Control actions that pertain to the export process.

Control actions that pertain to the HTML shell. Note that these actions should be used extremely sparingly, as they are very rarely needed (see the available functional actions for the HTML shell), and they can have confusing side effects for CSS hierarchies, as well as potentially interrupting Perseus’ interpolation processes. Changing certain things with these may break Perseus completely in certain cases!

Control actions that pertain to the server.

Control actions that pertain to altering settings from PerseusApp.

An action which can be taken by many plugins. When run, a functional action will return a map of plugin names to their return types.

Actions designed to be compatible with other plugins such that two plugins can execute the same action.

Functional actions that pertain to the build process. Note that these actions are not available for the build stage of the export process, and those should be registered separately.

Functional actions that pertain to the client-side code. These in particular should be as fast as possible.

Functional actions that pertain to the export process.

Functional actions that pertain to the process of exporting an error page.

Functional actions that pertain to the HTML shell.

Functional actions that pertain to the server.

Functional actions that pertain to altering the settings exported from PerseusApp.

A Perseus plugin. This must be exported by all plugin crates so the user can register the plugin easily.

A representation of all the plugins used by an app. Due to the sheer number and compexity of nested fields, this is best transferred in an Rc, which unfortunately results in double indirection for runner functions.

Enums

The environments a plugin can run in. These will affect Wasm bundle size.

Traits

A trait for the interface for a plugin action, which abstracts whether it’s a functional or a control action.

Functions

A helper function for plugins that don’t take any control actions. This just inserts an empty registrar.

A helper function for plugins that don’t take any functional actions. This just inserts and empty registrar.

Type Definitions

A runner function, which takes action data and plugin data.