Struct utf8_io::Utf8Reader [−][src]
pub struct Utf8Reader<Inner: Read> { /* fields omitted */ }
Expand description
A Read
implementation which translates from an input Read
producing
an arbitrary byte sequence into a valid UTF-8 sequence with invalid
sequences replaced by U+FFFD (REPLACEMENT CHARACTER) in the manner of
String::from_utf8_lossy
, where scalar value encodings never straddle
read
calls (callers can do str::from_utf8
and it will always
succeed).
Implementations
Trait Implementations
Borrows the file descriptor. Read more
Pull some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Read all bytes until EOF in this source, appending them to buf
. Read more
Like read
, except that it reads into a slice of buffers. Read more
can_vector
)Determines if this Read
er has an efficient read_vectored
implementation. Read more
read_initializer
)Determines if this Read
er can work with buffers of uninitialized
memory. Read more
Read all bytes until EOF in this source, placing them into buf
. Read more
Read the exact number of bytes required to fill buf
. Read more
Creates a “by reference” adaptor for this instance of Read
. Read more
Creates an adaptor which will chain this stream with another. Read more
Like read
but produces the result in a str
. Be sure to check the
size
field of the return value to see how many bytes were written. Read more
Like read_exact
but produces the result in a str
.
Auto Trait Implementations
impl<Inner> RefUnwindSafe for Utf8Reader<Inner> where
Inner: RefUnwindSafe,
impl<Inner> Send for Utf8Reader<Inner> where
Inner: Send,
impl<Inner> Sync for Utf8Reader<Inner> where
Inner: Sync,
impl<Inner> Unpin for Utf8Reader<Inner> where
Inner: Unpin,
impl<Inner> UnwindSafe for Utf8Reader<Inner> where
Inner: UnwindSafe,
Blanket Implementations
Borrows the reference. Read more
pub fn as_filelike_view<Target>(&self) -> FilelikeView<'_, Target> where
Target: FromFilelike + IntoFilelike,
pub fn as_filelike_view<Target>(&self) -> FilelikeView<'_, Target> where
Target: FromFilelike + IntoFilelike,
Return a borrowing view of a resource which dereferences to a &Target
or &mut Target
. Read more
Extracts the grip.
Extracts the raw grip.
Borrows the reference.
pub fn as_socketlike_view<Target>(&self) -> FilelikeView<'_, Target> where
Target: FromSocketlike + IntoSocketlike,
pub fn as_socketlike_view<Target>(&self) -> FilelikeView<'_, Target> where
Target: FromSocketlike + IntoSocketlike,
Return a borrowing view of a resource which dereferences to a &Target
or &mut Target
. Read more
Mutably borrows from an owned value. Read more