Function WireCursor.takeCursor
Borrow the next count bytes as a child cursor and advance this cursor.
Parameters
| Name | Description |
|---|---|
| count | Number of bytes to expose through the child cursor. |
| ok | Receives true when count bytes were available. |
Returns
A cursor over exactly the borrowed bytes on success, or an empty cursor
when ok is false.
Notes
The returned cursor borrows the same backing storage as this cursor.
return scope ties that borrow to the caller-visible lifetime of this
cursor without requiring an out-slice escape.