[−][src]Module maybe_xml::token
Tokens are the returned values when evaluating scanned byte ranges.
There are two types of tokens: borrowed
and owned
. Borrowed
tokens re-use an internal buffer to temporarily represent a token
value. Owned tokens have independent buffers which store the
the token value.
Methods which return a borrowed token act like a cursor API which provides a temporary read only view of the scanned bytes. It should perform better with less memory requirements.
Methods which return an owned token act like an iterator API which provides a value which can be easily stored or transformed. It should be easier to use but at the cost of performance and more memory usage.
There may be "properties" of a token. For instance, a start tag
should have a tag name and possibly attributes. Tokens have
methods which return types in the props
module. Properties
are borrowed views into a token.
Modules
borrowed | Borrowed tokens re-use an internal buffer to represent a scanned value. |
owned | Owned tokens have a copy of the scanned value. |
prop | Properties are borrowed byte slice views into tokens. |