Add a mark method and type.

This commit is contained in:
Nigel Tao committed 2017-09-23 13:17:37 +10:00
1 parent 6a48794033
commit fd5d44b3fc
13 files changed
+141 -77

No files matched your search

+2
View File
@@ -104,8 +104,10 @@ pub struct decoder?(
)
pub func decoder.decode?(dst writer1, src reader1)() {
var m0 buf1_mark = in.dst.mark()
var z status = try this.decode_blocks?(dst:in.dst, src:in.src)
if z.is_suspension() {
var m1 buf1_mark = in.dst.mark()
// TODO: add some way to specify the bounds of the slice.
//
// TODO: should "slice" be "slice!", as the return value lets you