Function writeCursor

Writes the contents of a cursor to a writer.

This method advances the cursor till the end of the document, outputting all nodes using the given writer. The actual work is done inside a fiber, which is then returned. This means that if the methods of the cursor call Fiber.yield, this method will not complete its work, but will return a fiber in HOLD status, which the user can call to advance the work. This is useful if the cursor has to wait for other nodes to be ready (e.g. if the cursor input is generated programmatically).


auto writeCursor(std.typecons.Flag!("useFiber").Flag useFiber, WriterType, CursorType)(
  auto ref WriterType writer,
  auto ref CursorType cursor