Expand description
Crate, that is used while building a plugin system as a common dependency by both plugin and plugin user to define the plugin behavior and safely import and use the plugin
§Plugin Side
To quickly learn how to create a plugin and export functions from it see
export_freight!
macro documentation
§Importer Side
To quickly learn how to import and use plugins see FreightProxy
documentation
Macros§
- export_
freight - A macro, which must be used for exporting a struct.
- export_
plugin - A macro, which can be used to make exporting of a struct easier
- import_
plugin - A macro, that makes plugin importing a little bit easier
- register_
freight - A macro, which can be used to create a registry function easier
Structs§
- Empty
Freight - Structure representing an empty
Freight
implementor, needed only forFreightProxy
configuration - Freight
Declaration - A structure, exported by plugin, containing some package details and register function
- Freight
Proxy - A structure, that contains a Freight object and is used to import and use it safely
- Function
- Structure representing main characteristics of a function needed for the program using a plugin, which implements it
- Type
- Structure representing main characteristics of an object type needed for the program, using the plugin, that either imports or defines this type in case this type is not present in the user program itself
Enums§
- Interplug
Request - Enum, that represents an interplugin request and either contains
a
InterplugRequest::Crucial
plugin request (must be provided in order for the plugin to work or anInterplugRequest::Optional
plugin request which may be denied - Limitation
- Enum that represents a system limitation, that a plugin either needs to know to work correctly, or should be notified of in case main program wants to limit some settings
- Runtime
Error - Enum, that represents a message passed to the program using the plugin when the function fails
Statics§
- API_
VERSION - Api version parameter, passed from the build script.
- RUSTC_
VERSION - Rust compiler version parameter, passed from the compiler.
Traits§
- Freight
- Trait, that defines the plugin behavior
- Freight
Registrar - Trait to be implemented on structs, which are used to register or store the imported plugins