Shared variant of Dynamic type; All read/write access operations in Dynamic backed by Read/Write lock guards; new shared() script function

This commit is contained in:
Ilya Lakhin
2020-07-27 11:30:09 +07:00
parent 721c578407
commit e5fe222de3
11 changed files with 383 additions and 73 deletions

View File

@@ -333,7 +333,7 @@ impl<'a> Scope<'a> {
.iter()
.rev()
.find(|Entry { name: key, .. }| name == key)
.and_then(|Entry { value, .. }| value.downcast_ref::<T>().cloned())
.and_then(|Entry { value, .. }| value.read::<T>())
}
/// Update the value of the named entry.