Trait html5ever::tendril::fmt::CharFormat
[−]pub unsafe trait CharFormat<'a>: Format {
type Iter: Iterator
where
<Self::Iter as Iterator>::Item == (usize, char);
unsafe fn char_indices(buf: &'a [u8]) -> Self::Iter;
fn encode_char<F>(ch: char, cont: F) -> Result<(), ()>
where
F: FnOnce(&[u8]);
}
Expand description
Indicates a format which contains characters from Unicode (all of it, or some proper subset).
Associated Types
Required methods
unsafe fn char_indices(buf: &'a [u8]) -> Self::Iter
unsafe fn char_indices(buf: &'a [u8]) -> Self::Iter
Iterate over the characters of the string and their byte indices.
You may assume the buffer is already validated for Format
.