Struct ayaka_runtime::plugin::Module
source · pub struct Module<M: RawModule = BackendModule> { /* private fields */ }Expand description
The plugin module with high-level interfaces.
Implementations§
source§impl<M: RawModule> Module<M>
impl<M: RawModule> Module<M>
sourcepub fn plugin_type(&self) -> Result<PluginType>
pub fn plugin_type(&self) -> Result<PluginType>
Gets the PluginType.
sourcepub fn process_action(
&self,
ctx: ActionProcessContextRef<'_>
) -> Result<ActionProcessResult>
pub fn process_action( &self, ctx: ActionProcessContextRef<'_> ) -> Result<ActionProcessResult>
Processes Action in action plugin.
sourcepub fn dispatch_text(
&self,
name: &str,
args: &[String],
ctx: TextProcessContextRef<'_>
) -> Result<TextProcessResult>
pub fn dispatch_text( &self, name: &str, args: &[String], ctx: TextProcessContextRef<'_> ) -> Result<TextProcessResult>
Calls a custom command in the text plugin.
sourcepub fn dispatch_line(
&self,
name: &str,
ctx: LineProcessContextRef<'_>
) -> Result<LineProcessResult>
pub fn dispatch_line( &self, name: &str, ctx: LineProcessContextRef<'_> ) -> Result<LineProcessResult>
Calls a custom command in the line plugin.
sourcepub fn process_game(
&self,
ctx: GameProcessContextRef<'_>
) -> Result<GameProcessResult>
pub fn process_game( &self, ctx: GameProcessContextRef<'_> ) -> Result<GameProcessResult>
Processes Game when opening the config file.
Auto Trait Implementations§
impl<M> RefUnwindSafe for Module<M>where M: RefUnwindSafe,
impl<M> Send for Module<M>where M: Send,
impl<M> Sync for Module<M>where M: Sync,
impl<M> Unpin for Module<M>where M: Unpin,
impl<M> UnwindSafe for Module<M>where M: UnwindSafe,
Blanket Implementations§
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.