Initial setup for results for wasm
This commit is contained in:
@@ -573,6 +573,11 @@ impl ScriptContainer {
|
||||
&self.script
|
||||
}
|
||||
|
||||
/// Whether or not the script is set.
|
||||
pub fn is_any(&self) -> bool {
|
||||
self.script.read().is_some()
|
||||
}
|
||||
|
||||
/// Get the underlying script as the downcasted value.
|
||||
pub fn get_as<T: 'static>(&self) -> Result<MappedRwLockReadGuard<T>> {
|
||||
let r = RwLockReadGuard::try_map(self.script.read(), |a| unsafe {
|
||||
|
||||
Reference in New Issue
Block a user