Struct ayaka_runtime::plugin::Runtime
source · pub struct Runtime<M: RawModule + Send + Sync + 'static> { /* private fields */ }Expand description
The plugin runtime.
Implementations§
source§impl<M: RawModule + Send + Sync + 'static> Runtime<M>
impl<M: RawModule + Send + Sync + 'static> Runtime<M>
sourcepub fn load<'a>(
dir: impl AsRef<str> + 'a,
root_path: &'a VfsPath,
names: &'a [impl AsRef<str>],
store: M::Linker
) -> impl Future<Output = Result<Arc<Self>>> + Stream<Item = LoadStatus> + 'a
pub fn load<'a>( dir: impl AsRef<str> + 'a, root_path: &'a VfsPath, names: &'a [impl AsRef<str>], store: M::Linker ) -> impl Future<Output = Result<Arc<Self>>> + Stream<Item = LoadStatus> + 'a
Load plugins from specific directory and plugin names.
The actual load folder will be rel_to.join(dir).
If names is empty, all WASM files will be loaded.
sourcepub fn action_modules(&self) -> impl Iterator<Item = &Module<M>>
pub fn action_modules(&self) -> impl Iterator<Item = &Module<M>>
Iterates action modules.
sourcepub fn text_module(&self, cmd: &str) -> Option<&Module<M>>
pub fn text_module(&self, cmd: &str) -> Option<&Module<M>>
Gets text module from command.
sourcepub fn line_module(&self, cmd: &str) -> Option<&Module<M>>
pub fn line_module(&self, cmd: &str) -> Option<&Module<M>>
Gets line module from command.
sourcepub fn game_modules(&self) -> impl Iterator<Item = &Module<M>>
pub fn game_modules(&self) -> impl Iterator<Item = &Module<M>>
Iterates game modules.
Auto Trait Implementations§
impl<M> RefUnwindSafe for Runtime<M>where
M: RefUnwindSafe,
impl<M> Send for Runtime<M>
impl<M> Sync for Runtime<M>
impl<M> Unpin for Runtime<M>where
M: Unpin,
impl<M> UnwindSafe for Runtime<M>where
M: UnwindSafe,
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