pub struct UnsafeStringReader(pub *const u8);Expand description
An implementation of Read for a byte array, without buffer over-read
protection.
Tuple Fields§
§0: *const u8Trait Implementations§
Source§impl Read for UnsafeStringReader
impl Read for UnsafeStringReader
Source§fn read(&mut self, buf: &mut [u8]) -> Result<usize>
fn read(&mut self, buf: &mut [u8]) -> Result<usize>
Pull some bytes from this source into the specified buffer, returning
how many bytes were read. Read more
fn read_out(&mut self, out: Out<'_, [u8]>) -> Result<usize>
Source§unsafe fn initializer(&self) -> Initializer
unsafe fn initializer(&self) -> Initializer
Determines if this
Reader can work with buffers of uninitialized
memory. Read moreSource§fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize>
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize>
Read all bytes until EOF in this source, placing them into
buf. Read moreSource§fn read_to_string(&mut self, buf: &mut String) -> Result<usize>
fn read_to_string(&mut self, buf: &mut String) -> Result<usize>
Read all bytes until EOF in this source, appending them to
buf. Read moreSource§fn read_exact(&mut self, buf: &mut [u8]) -> Result<()>
fn read_exact(&mut self, buf: &mut [u8]) -> Result<()>
Read the exact number of bytes required to fill
buf. Read moreSource§fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
Creates a “by reference” adaptor for this instance of
Read. Read moreAuto Trait Implementations§
impl Freeze for UnsafeStringReader
impl RefUnwindSafe for UnsafeStringReader
impl !Send for UnsafeStringReader
impl !Sync for UnsafeStringReader
impl Unpin for UnsafeStringReader
impl UnsafeUnpin for UnsafeStringReader
impl UnwindSafe for UnsafeStringReader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more