Add Memory.WriteString (#820)

Signed-off-by: Anuraag Agrawal <anuraaga@gmail.com>
This commit is contained in:
Anuraag Agrawal
2022-10-03 17:26:36 +09:00
committed by GitHub
parent 2fc5f6d0c5
commit 0b4dbfd8d6
3 changed files with 60 additions and 0 deletions

View File

@@ -459,6 +459,9 @@ type Memory interface {
// Write writes the slice to the underlying buffer at the offset or returns false if out of range.
Write(ctx context.Context, offset uint32, v []byte) bool
// WriteString writes the string to the underlying buffer at the offset or returns false if out of range.
WriteString(ctx context.Context, offset uint32, v string) bool
}
// EncodeExternref encodes the input as a ValueTypeExternref.