[−][src]Trait tendril::fmt::CharFormat
Indicates a format which contains characters from Unicode (all of it, or some proper subset).
Associated Types
Loading content...Required methods
pub unsafe fn char_indices(buf: &'a [u8]) -> Self::Iter
[src]
Iterate over the characters of the string and their byte indices.
You may assume the buffer is already validated for Format
.
pub fn encode_char<F>(ch: char, cont: F) -> Result<(), ()> where
F: FnOnce(&[u8]),
[src]
F: FnOnce(&[u8]),
Encode the character as bytes and pass them to a continuation.
Returns Err(())
iff the character cannot be represented.
Implementors
impl<'a> CharFormat<'a> for ASCII
[src]
type Iter = SingleByteCharIndices<'a>
pub unsafe fn char_indices(buf: &'a [u8]) -> SingleByteCharIndices<'a>ⓘNotable traits for SingleByteCharIndices<'a>
impl<'a> Iterator for SingleByteCharIndices<'a> type Item = (usize, char);
[src]
Notable traits for SingleByteCharIndices<'a>
impl<'a> Iterator for SingleByteCharIndices<'a> type Item = (usize, char);
pub fn encode_char<F>(ch: char, cont: F) -> Result<(), ()> where
F: FnOnce(&[u8]),
[src]
F: FnOnce(&[u8]),
impl<'a> CharFormat<'a> for Latin1
[src]
type Iter = SingleByteCharIndices<'a>
pub unsafe fn char_indices(buf: &'a [u8]) -> SingleByteCharIndices<'a>ⓘNotable traits for SingleByteCharIndices<'a>
impl<'a> Iterator for SingleByteCharIndices<'a> type Item = (usize, char);
[src]
Notable traits for SingleByteCharIndices<'a>
impl<'a> Iterator for SingleByteCharIndices<'a> type Item = (usize, char);
pub fn encode_char<F>(ch: char, cont: F) -> Result<(), ()> where
F: FnOnce(&[u8]),
[src]
F: FnOnce(&[u8]),
impl<'a> CharFormat<'a> for UTF8
[src]
type Iter = CharIndices<'a>
pub unsafe fn char_indices(buf: &'a [u8]) -> CharIndices<'a>
[src]
pub fn encode_char<F>(ch: char, cont: F) -> Result<(), ()> where
F: FnOnce(&[u8]),
[src]
F: FnOnce(&[u8]),