Writes the `val` provided to the `ptr` provided. This commit will write a `val` into a guest's linear memory. This will delegate to `T`'s implementation of `write`. # Errors An error is returned if `ptr` is out of bounds, misaligned, or otherwise not valid to read from.
(&mut self, ptr: GuestPtr<T>, val: T)
| 77 | /// An error is returned if `ptr` is out of bounds, misaligned, or otherwise |
| 78 | /// not valid to read from. |
| 79 | pub fn write<T>(&mut self, ptr: GuestPtr<T>, val: T) -> Result<(), GuestError> |
| 80 | where |
| 81 | T: GuestType, |
| 82 | { |
| 83 | T::write(self, ptr, val) |
| 84 | } |
| 85 | |
| 86 | /// Acquires a slice or owned copy of the memory pointed to by `ptr`. |
| 87 | /// |