markup sink consumes a markup stream; that is, a stream of data content that includes markup events.
markup sink is a subtype of
string sink; therefore, a
markup sink can be used anywhere a
string sink could be used.
Generally speaking, all actions and operators that work with
string sink will also work with
markup sink. There are a few things to keep in mind, however:
putaction that has a
markup sinkas its left hand argument can have either a
markup sinkor a
string sinkas its right hand argument. If the left hand argument is a
string sink, though, then the right hand argument must also be a
output-toaction accepts a
markup sinkas well as a
string sinkwith the same restrictions on scope-escaping.
flushbehave the same way on a
markup sinkas they would on a
string sink. None of these actions works on a value argument.
&) can be used with
markup sinkarguments. If both arguments have
markup sinktype, then the result is also a
markup sink. If one argument is a
string sink, then the result is also a
and, will accept
markup sinkarguments because they are a subtype of
string sink. However, the result is always a
string sinkargument will also accept a
markup sinkin that position.
markup sinkcast operator that tries to invoke an appropriate user-defined conversion function.