pub struct SteelEngine { /* private fields */ }Expand description
Steel Scheme-based plugin engine.
Implementations§
Source§impl SteelEngine
impl SteelEngine
Sourcepub fn new(config: PluginConfig) -> Self
pub fn new(config: PluginConfig) -> Self
Create a new Steel engine with the given configuration.
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Create a new Steel engine with default configuration.
Sourcepub fn config(&self) -> &PluginConfig
pub fn config(&self) -> &PluginConfig
Get the plugin configuration.
Sourcepub fn loaded_plugins(&self) -> &[PathBuf]
pub fn loaded_plugins(&self) -> &[PathBuf]
Get the list of loaded plugins.
Source§impl SteelEngine
impl SteelEngine
Sourcepub fn register_command(&mut self, cmd: CustomCommand)
pub fn register_command(&mut self, cmd: CustomCommand)
Register a custom command from Scheme.
Trait Implementations§
Source§impl PluginSystem for SteelEngine
impl PluginSystem for SteelEngine
Source§fn initialize(&mut self) -> Result<()>
fn initialize(&mut self) -> Result<()>
Initialize the plugin system.
Source§fn run_hook(
&mut self,
event: HookEvent,
ctx: &PluginContext,
) -> Result<HookResult>
fn run_hook( &mut self, event: HookEvent, ctx: &PluginContext, ) -> Result<HookResult>
Run hooks for an event.
Source§fn register_api(&mut self) -> Result<()>
fn register_api(&mut self) -> Result<()>
Register the hx API functions.
Auto Trait Implementations§
impl !RefUnwindSafe for SteelEngine
impl !Send for SteelEngine
impl !Sync for SteelEngine
impl !UnwindSafe for SteelEngine
impl Freeze for SteelEngine
impl Unpin for SteelEngine
impl UnsafeUnpin for SteelEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more