Trait utf16_ext::Utf16ReadExt [] [src]

pub trait Utf16ReadExt: ReadBytesExt {
    fn shorts<T: ByteOrder>(self) -> Shorts<T, Self>
    where
        Self: Sized
, { ... }
fn utf16_chars<T: ByteOrder>(self) -> Chars<T, Self>
    where
        Self: Sized
, { ... }
fn read_utf16_line<T: ByteOrder>(
        &mut self,
        buf: &mut String
    ) -> Result<usize, Error> { ... }
fn utf16_lines<T: ByteOrder>(self) -> Lines<T, Self>
    where
        Self: Sized
, { ... } }

Extension to the Read trait

Provided Methods

Transforms this instance into an Iterator over its u16-units (shorts).

The returned type implements Iterator where the Item is Result<u16, R::Err>. The yielded item is Ok if a short was successfully read and Err otherwise. EOF is mapped to returning None from this iterator.

Transforms this instance into an Iterator over chars from utf-16.

The returned type implements Iterator where the Item is Result<char, R::Err>.

Reads all chars (from utf16) until a newline is reached (U+000A) and appends them to the provided buffer.

Returns an iterator over the lines of this reader.

Like the normal BufRead::lines, newlines characters aren't included

Implementors