mirror of
https://github.com/lune-org/lune.git
synced 2025-04-10 21:40:54 +01:00
make data struct ready for impl
This commit is contained in:
parent
16b3cde97e
commit
62fd0d00b1
1 changed files with 4 additions and 3 deletions
|
@ -1,14 +1,15 @@
|
||||||
use crate::{library::StandardLibrary, luaurc::RequireAlias};
|
use crate::{library::StandardLibrary, luaurc::RequireAlias};
|
||||||
use mlua::prelude::*;
|
use mlua::prelude::*;
|
||||||
use std::{collections::HashMap, sync::Arc};
|
use std::{collections::HashMap, path::PathBuf, sync::Arc};
|
||||||
use tokio::sync::Mutex;
|
use tokio::sync::{broadcast::Sender, Mutex};
|
||||||
|
|
||||||
/// The private struct that's stored in mlua's app data container
|
/// The private struct that's stored in mlua's app data container
|
||||||
#[derive(Debug, Default)]
|
#[derive(Debug, Default)]
|
||||||
struct RequireContextData<'a> {
|
struct RequireContextData<'a> {
|
||||||
std: HashMap<&'a str, HashMap<&'a str, Box<dyn StandardLibrary>>>,
|
std: HashMap<&'a str, HashMap<&'a str, Box<dyn StandardLibrary>>>,
|
||||||
std_cache: HashMap<RequireAlias, LuaRegistryKey>,
|
std_cache: HashMap<RequireAlias, LuaRegistryKey>,
|
||||||
cache: Arc<Mutex<HashMap<&'a str, LuaRegistryKey>>>,
|
cache: Arc<Mutex<HashMap<PathBuf, LuaRegistryKey>>>,
|
||||||
|
pending: Arc<Mutex<HashMap<PathBuf, Sender<()>>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
|
Loading…
Add table
Reference in a new issue