Method
get_memory
(&mut self, name: &str, shared: bool)
Source from the content-addressed store, hash-verified
| 185 | } |
| 186 | |
| 187 | fn get_memory(&mut self, name: &str, shared: bool) -> Option<Vec<u8>> { |
| 188 | Some(if shared { |
| 189 | let memory = self |
| 190 | .instance |
| 191 | .get_shared_memory(&mut self.store, name) |
| 192 | .unwrap(); |
| 193 | memory.data().iter().map(|i| unsafe { *i.get() }).collect() |
| 194 | } else { |
| 195 | self.instance |
| 196 | .get_memory(&mut self.store, name) |
| 197 | .unwrap() |
| 198 | .data(&self.store) |
| 199 | .to_vec() |
| 200 | }) |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | impl From<&DiffValue> for Val { |
Callers
nothing calls this directly
Tested by
no test coverage detected