pub struct Repeat { /* private fields */ }Expand description
A reader that gives one byte over and over, without end. Made by
repeat.
Trait Implementations§
Source§impl AsyncRead for Repeat
impl AsyncRead for Repeat
impl Copy for Repeat
Auto Trait Implementations§
impl Freeze for Repeat
impl RefUnwindSafe for Repeat
impl Send for Repeat
impl Sync for Repeat
impl Unpin for Repeat
impl UnsafeUnpin for Repeat
impl UnwindSafe for Repeat
Blanket Implementations§
Source§impl<R> AsyncReadExt for R
impl<R> AsyncReadExt for R
Source§fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self> ⓘwhere
Self: Unpin,
fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self> ⓘwhere
Self: Unpin,
Reads some bytes into
buf, answering how many (0 at the end).Source§fn read_buf<'a, 'b>(
&'a mut self,
buf: &'a mut ReadBuf<'b>,
) -> ReadBufFuture<'a, 'b, Self> ⓘwhere
Self: Unpin,
fn read_buf<'a, 'b>(
&'a mut self,
buf: &'a mut ReadBuf<'b>,
) -> ReadBufFuture<'a, 'b, Self> ⓘwhere
Self: Unpin,
Reads some bytes into the unfilled part of
buf and counts them
filled, answering how many (0 at the end, or when buf is full).Source§fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self> ⓘwhere
Self: Unpin,
fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self> ⓘwhere
Self: Unpin,
Fills
buf exactly, answering its length; an end of the stream
first is an UnexpectedEof error.Source§fn read_to_end<'a>(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEnd<'a, Self> ⓘwhere
Self: Unpin,
fn read_to_end<'a>(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEnd<'a, Self> ⓘwhere
Self: Unpin,
Reads to the end of the stream, appending to
buf; answers how many
bytes it appended.Source§fn read_to_string<'a>(
&'a mut self,
buf: &'a mut String,
) -> ReadToString<'a, Self> ⓘwhere
Self: Unpin,
fn read_to_string<'a>(
&'a mut self,
buf: &'a mut String,
) -> ReadToString<'a, Self> ⓘwhere
Self: Unpin,
Reads to the end of the stream, appending to
buf if what it read is
UTF-8 (an InvalidData error and buf
as it was otherwise); answers how many bytes it appended.Source§fn take(self, limit: u64) -> Take<Self>where
Self: Sized,
fn take(self, limit: u64) -> Take<Self>where
Self: Sized,
A reader that ends after
limit bytes of this one.Source§fn chain<R: AsyncRead>(self, next: R) -> Chain<Self, R>where
Self: Sized,
fn chain<R: AsyncRead>(self, next: R) -> Chain<Self, R>where
Self: Sized,
A reader that reads this one to its end, then
next.Source§fn read_u8(&mut self) -> ReadNumber<'_, Self, u8, 1> ⓘwhere
Self: Unpin,
fn read_u8(&mut self) -> ReadNumber<'_, Self, u8, 1> ⓘwhere
Self: Unpin,
Reads an unsigned byte (1 bytes, exactly).
Source§fn read_i8(&mut self) -> ReadNumber<'_, Self, i8, 1> ⓘwhere
Self: Unpin,
fn read_i8(&mut self) -> ReadNumber<'_, Self, i8, 1> ⓘwhere
Self: Unpin,
Reads a signed byte (1 bytes, exactly).
Source§fn read_u16(&mut self) -> ReadNumber<'_, Self, u16, 2> ⓘwhere
Self: Unpin,
fn read_u16(&mut self) -> ReadNumber<'_, Self, u16, 2> ⓘwhere
Self: Unpin,
Reads a big-endian
u16 (2 bytes, exactly).Source§fn read_u16_le(&mut self) -> ReadNumber<'_, Self, u16, 2> ⓘwhere
Self: Unpin,
fn read_u16_le(&mut self) -> ReadNumber<'_, Self, u16, 2> ⓘwhere
Self: Unpin,
Reads a little-endian
u16 (2 bytes, exactly).Source§fn read_i16(&mut self) -> ReadNumber<'_, Self, i16, 2> ⓘwhere
Self: Unpin,
fn read_i16(&mut self) -> ReadNumber<'_, Self, i16, 2> ⓘwhere
Self: Unpin,
Reads a big-endian
i16 (2 bytes, exactly).Source§fn read_i16_le(&mut self) -> ReadNumber<'_, Self, i16, 2> ⓘwhere
Self: Unpin,
fn read_i16_le(&mut self) -> ReadNumber<'_, Self, i16, 2> ⓘwhere
Self: Unpin,
Reads a little-endian
i16 (2 bytes, exactly).Source§fn read_u32(&mut self) -> ReadNumber<'_, Self, u32, 4> ⓘwhere
Self: Unpin,
fn read_u32(&mut self) -> ReadNumber<'_, Self, u32, 4> ⓘwhere
Self: Unpin,
Reads a big-endian
u32 (4 bytes, exactly).Source§fn read_u32_le(&mut self) -> ReadNumber<'_, Self, u32, 4> ⓘwhere
Self: Unpin,
fn read_u32_le(&mut self) -> ReadNumber<'_, Self, u32, 4> ⓘwhere
Self: Unpin,
Reads a little-endian
u32 (4 bytes, exactly).Source§fn read_i32(&mut self) -> ReadNumber<'_, Self, i32, 4> ⓘwhere
Self: Unpin,
fn read_i32(&mut self) -> ReadNumber<'_, Self, i32, 4> ⓘwhere
Self: Unpin,
Reads a big-endian
i32 (4 bytes, exactly).Source§fn read_i32_le(&mut self) -> ReadNumber<'_, Self, i32, 4> ⓘwhere
Self: Unpin,
fn read_i32_le(&mut self) -> ReadNumber<'_, Self, i32, 4> ⓘwhere
Self: Unpin,
Reads a little-endian
i32 (4 bytes, exactly).Source§fn read_u64(&mut self) -> ReadNumber<'_, Self, u64, 8> ⓘwhere
Self: Unpin,
fn read_u64(&mut self) -> ReadNumber<'_, Self, u64, 8> ⓘwhere
Self: Unpin,
Reads a big-endian
u64 (8 bytes, exactly).Source§fn read_u64_le(&mut self) -> ReadNumber<'_, Self, u64, 8> ⓘwhere
Self: Unpin,
fn read_u64_le(&mut self) -> ReadNumber<'_, Self, u64, 8> ⓘwhere
Self: Unpin,
Reads a little-endian
u64 (8 bytes, exactly).Source§fn read_i64(&mut self) -> ReadNumber<'_, Self, i64, 8> ⓘwhere
Self: Unpin,
fn read_i64(&mut self) -> ReadNumber<'_, Self, i64, 8> ⓘwhere
Self: Unpin,
Reads a big-endian
i64 (8 bytes, exactly).Source§fn read_i64_le(&mut self) -> ReadNumber<'_, Self, i64, 8> ⓘwhere
Self: Unpin,
fn read_i64_le(&mut self) -> ReadNumber<'_, Self, i64, 8> ⓘwhere
Self: Unpin,
Reads a little-endian
i64 (8 bytes, exactly).Source§fn read_u128(&mut self) -> ReadNumber<'_, Self, u128, 16> ⓘwhere
Self: Unpin,
fn read_u128(&mut self) -> ReadNumber<'_, Self, u128, 16> ⓘwhere
Self: Unpin,
Reads a big-endian
u128 (16 bytes, exactly).Source§fn read_u128_le(&mut self) -> ReadNumber<'_, Self, u128, 16> ⓘwhere
Self: Unpin,
fn read_u128_le(&mut self) -> ReadNumber<'_, Self, u128, 16> ⓘwhere
Self: Unpin,
Reads a little-endian
u128 (16 bytes, exactly).Source§fn read_i128(&mut self) -> ReadNumber<'_, Self, i128, 16> ⓘwhere
Self: Unpin,
fn read_i128(&mut self) -> ReadNumber<'_, Self, i128, 16> ⓘwhere
Self: Unpin,
Reads a big-endian
i128 (16 bytes, exactly).Source§fn read_i128_le(&mut self) -> ReadNumber<'_, Self, i128, 16> ⓘwhere
Self: Unpin,
fn read_i128_le(&mut self) -> ReadNumber<'_, Self, i128, 16> ⓘwhere
Self: Unpin,
Reads a little-endian
i128 (16 bytes, exactly).Source§fn read_f32(&mut self) -> ReadNumber<'_, Self, f32, 4> ⓘwhere
Self: Unpin,
fn read_f32(&mut self) -> ReadNumber<'_, Self, f32, 4> ⓘwhere
Self: Unpin,
Reads a big-endian
f32 (4 bytes, exactly).Source§fn read_f32_le(&mut self) -> ReadNumber<'_, Self, f32, 4> ⓘwhere
Self: Unpin,
fn read_f32_le(&mut self) -> ReadNumber<'_, Self, f32, 4> ⓘwhere
Self: Unpin,
Reads a little-endian
f32 (4 bytes, exactly).Source§fn read_f64(&mut self) -> ReadNumber<'_, Self, f64, 8> ⓘwhere
Self: Unpin,
fn read_f64(&mut self) -> ReadNumber<'_, Self, f64, 8> ⓘwhere
Self: Unpin,
Reads a big-endian
f64 (8 bytes, exactly).Source§fn read_f64_le(&mut self) -> ReadNumber<'_, Self, f64, 8> ⓘwhere
Self: Unpin,
fn read_f64_le(&mut self) -> ReadNumber<'_, Self, f64, 8> ⓘwhere
Self: Unpin,
Reads a little-endian
f64 (8 bytes, exactly).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